<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libssl/bs_cbs.c, branch OPENBSD_6_8_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_6_8_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2019-01-23T22:20:40+00:00</updated>
<entry>
<title>assert.h is often misused. It should not be used in a library</title>
<updated>2019-01-23T22:20:40+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2019-01-23T22:20:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5f0a8a144321350e4fbf1de6dd8937ff85055a6d'/>
<id>urn:sha1:5f0a8a144321350e4fbf1de6dd8937ff85055a6d</id>
<content type='text'>
ok bcook@ jsing@
</content>
</entry>
<entry>
<title>Stop using BUF_memdup() within the LibreSSL code base - it is correctly</title>
<updated>2015-06-24T09:44:18+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2015-06-24T09:44:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=346042b6e220ac94d87729e430272193855ae67a'/>
<id>urn:sha1:346042b6e220ac94d87729e430272193855ae67a</id>
<content type='text'>
spelt malloc+memcpy, which is what is used in all except two places.

ok deraadt@ doug@
</content>
</entry>
<entry>
<title>Change CBS_dup() to also sync the offset.</title>
<updated>2015-06-23T05:58:28+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-23T05:58:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9a31903e554f01ace552d6ed0a48e3af5e464664'/>
<id>urn:sha1:9a31903e554f01ace552d6ed0a48e3af5e464664</id>
<content type='text'>
Previously, CBS_dup() had its own offset.  However, it is more consistent
to copy everything.

ok miod@ jsing@
</content>
</entry>
<entry>
<title>Replace internal call to CRYPTO_memcmp with timingsafe_memcmp.</title>
<updated>2015-06-20T01:21:51+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-20T01:21:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8f9592772f7e719ef92d7e0ccc1c46212180591a'/>
<id>urn:sha1:8f9592772f7e719ef92d7e0ccc1c46212180591a</id>
<content type='text'>
Suggested by jsing@.

ok jsing@ miod@
</content>
</entry>
<entry>
<title>Add CBS_dup() to initialize a new CBS with the same values.</title>
<updated>2015-06-19T00:23:36+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-19T00:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=512915f28ea9c781f7fb047c687e3863fa3168b7'/>
<id>urn:sha1:512915f28ea9c781f7fb047c687e3863fa3168b7</id>
<content type='text'>
This is useful for when you need to check the data ahead and then continue
on from the same spot.

input + ok jsing@ miod@
</content>
</entry>
<entry>
<title>Use explicit int in bs_cbs.c.</title>
<updated>2015-06-17T07:25:56+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-17T07:25:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=57e742a1d579791e1b790335874f838b2ccc286a'/>
<id>urn:sha1:57e742a1d579791e1b790335874f838b2ccc286a</id>
<content type='text'>
ok miod@ jsing@
</content>
</entry>
<entry>
<title>Add CBS_write_bytes() to copy the remaining CBS bytes to the caller.</title>
<updated>2015-06-17T07:06:22+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-17T07:06:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a0e2b99538b9b1895c2d8eee148f86142f9e99f7'/>
<id>urn:sha1:a0e2b99538b9b1895c2d8eee148f86142f9e99f7</id>
<content type='text'>
This is a common operation when dealing with CBS.

ok miod@ jsing@
</content>
</entry>
<entry>
<title>Add a new function CBS_offset() to report the current offset in the data.</title>
<updated>2015-06-17T07:00:22+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-17T07:00:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3f41fbd5a47c722047de0a060c1e410a5fba87bb'/>
<id>urn:sha1:3f41fbd5a47c722047de0a060c1e410a5fba87bb</id>
<content type='text'>
"why not" miod@, sure jsing@
</content>
</entry>
<entry>
<title>Simplify cbs_get_any_asn1_element_internal based on comments from jsing@</title>
<updated>2015-06-16T06:11:39+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-16T06:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9df3ee5634f566b673844ce7c87d9cd5481d92c7'/>
<id>urn:sha1:9df3ee5634f566b673844ce7c87d9cd5481d92c7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Make CBS_get_any_asn1_element() more compliant with DER encoding.</title>
<updated>2015-06-15T07:35:49+00:00</updated>
<author>
<name>doug</name>
<email></email>
</author>
<published>2015-06-15T07:35:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f06caa67ef95efe3935b9b1e51f4e8a10a52d973'/>
<id>urn:sha1:f06caa67ef95efe3935b9b1e51f4e8a10a52d973</id>
<content type='text'>
CBS_get_any_asn1_element violates DER encoding by allowing indefinite
form.  All callers except bs_ber.c expect DER encoding.  The callers
must check to see if it was indefinite or not.

Rather than exposing all callers to this behavior,
cbs_get_any_asn1_element_internal() allows specifying whether you want to
allow the normally forbidden indefinite form.  This is used by
CBS_get_any_asn1_element() for strict DER encoding and by a new static
function in bs_ber.c for the relaxed version.

While I was here, I added comments to differentiate between ASN.1
restrictions and CBS limitations.

ok miod@
</content>
</entry>
</feed>
