<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/bio/b_dump.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-05-10T05:54:39+00:00</updated>
<entry>
<title>Use err_local.h rather than err.h in most places</title>
<updated>2025-05-10T05:54:39+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2025-05-10T05:54:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=41e8f99dd1625a9f0c80ce9d4383e95b18e85709'/>
<id>urn:sha1:41e8f99dd1625a9f0c80ce9d4383e95b18e85709</id>
<content type='text'>
ok jsing
</content>
</entry>
<entry>
<title>Remove BIO_dump_*{cb,fp}()</title>
<updated>2024-03-02T09:21:24+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-03-02T09:21:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3be324ad741698effde1f32fdbee99994ab576d2'/>
<id>urn:sha1:3be324ad741698effde1f32fdbee99994ab576d2</id>
<content type='text'>
These were disabled and the internals that need to remain were fixed.
Time for this garbage to go.

ok jsing
</content>
</entry>
<entry>
<title>BIO_dump*() avoid signed integer overflow</title>
<updated>2024-02-15T10:34:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-02-15T10:34:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=45f8e1de70fd627784044281c983866986be786a'/>
<id>urn:sha1:45f8e1de70fd627784044281c983866986be786a</id>
<content type='text'>
This API returns an int encoding the number of bytes printed. Thus, a dump
of a large enough byte string can make this overflow and rely on undefined
behavior.  With an indent of 64, as little as 26 MB is enough to make this
happen.

ok jsing
</content>
</entry>
<entry>
<title>Reimplement BIO_dump_indent() with CBS/CBB and BIO_printf()</title>
<updated>2024-02-02T10:53:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-02-02T10:53:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=989da4ff25e43b01aa92032006c42983562c68bd'/>
<id>urn:sha1:989da4ff25e43b01aa92032006c42983562c68bd</id>
<content type='text'>
Instead of heaps of unchecked strlcpy/strlcat/snprintf doing hard to follow
gymnastics, use a byte string, a somewhat comprehensible computation of the
number of bytes to dump per output line and write using checked BIO_printf()
directly to the BIO.

Longer strings will still overflow the terminal width of 80 and even longer
strings will still overflow the return value (undefined behavior). I don't
care much about the former but the latter should be fixed in a later pass.

ok beck
</content>
</entry>
<entry>
<title>Prepare to remove the _cb() and _fp() versions of BIO_dump()</title>
<updated>2024-02-01T17:04:09+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-02-01T17:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4eb78b51aee4bd5ba9d46d0026200ae12a29bf93'/>
<id>urn:sha1:4eb78b51aee4bd5ba9d46d0026200ae12a29bf93</id>
<content type='text'>
apache-httpd uses BIO_dump(), libssl uses BIO_dump_indent(), and the
openssl(1) app uses both. Otherwise this is unused. This is horribly
bad code even by libcrypto standards.

By doing away with the callbacks fixes incorrect error checking for
fwrite() but there is a lot more wrong in here. This can be cleaned
up in a later pass, the only concern here is to be able to remove the
unused variants in the next major bump.

ok beck
</content>
</entry>
<entry>
<title>reinstate KNF for comment</title>
<updated>2023-07-29T02:32:00+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-29T02:32:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=22ae396a6c0b958d70badd7c856406acd196fcbe'/>
<id>urn:sha1:22ae396a6c0b958d70badd7c856406acd196fcbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Unbreak the namespace build after a broken mk.conf and tool misfire had</title>
<updated>2023-07-07T19:37:54+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-07T19:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=1ca8095297adf80b48019b5a2d18010ff9e3427f'/>
<id>urn:sha1:1ca8095297adf80b48019b5a2d18010ff9e3427f</id>
<content type='text'>
me aliasing symbols not in the headers I was procesing.

This unbreaks the namespace build so it will pass again

ok tb@
</content>
</entry>
<entry>
<title>Hide symbols in asn1 and bio</title>
<updated>2023-07-05T21:23:37+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-05T21:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0da1913b3c721e1a62fd66bc43547b4e910cbc34'/>
<id>urn:sha1:0da1913b3c721e1a62fd66bc43547b4e910cbc34</id>
<content type='text'>
ok jsing@
</content>
</entry>
<entry>
<title>Avoid potential divide by zero in BIO_dump_indent_cb()</title>
<updated>2022-10-17T18:26:41+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-10-17T18:26:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=16d28f35982285c3fa25fa684eeccb156a626557'/>
<id>urn:sha1:16d28f35982285c3fa25fa684eeccb156a626557</id>
<content type='text'>
Passing an indent value of 67 results in DUMP_WIDTH_LESS_IDENT returning a
value of zero, which is promptly used for division. Likewise, passing a
value larger than 67 results in a negative value being returned.

Prevent this by limiting indent to 64 (which matches OpenSSL's current
behaviour), as well as ensuring that dump_width is &gt; 0.

Should fix oss-fuzz #52464 and #52467.

ok miod@ tb@
</content>
</entry>
<entry>
<title>While the traditional OpenSSL return value and behaviour of BIO_dump(3)</title>
<updated>2021-07-11T20:18:07+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2021-07-11T20:18:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=60e361c7ad4d3810a5c94e8def304ac4427b9c59'/>
<id>urn:sha1:60e361c7ad4d3810a5c94e8def304ac4427b9c59</id>
<content type='text'>
is pure comedy gold, and now documented as such, sadly this bit of pure
Muppet genius can't really in good consience stay in the tree as is.

Change BIO_dump to always return the number of bytes printed on success
and to stop printing and return -1 on failure if a writing function
fails.

ok tb@, jsing@
</content>
</entry>
</feed>
