<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/asn1, branch OPENBSD_7_1_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_1_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_1_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2022-04-10T12:42:33+00:00</updated>
<entry>
<title>Set ASN1_OBJECT_FLAG_DYNAMIC_DATA flag with t2i_ASN1_OBJECT_internal</title>
<updated>2022-04-10T12:42:33+00:00</updated>
<author>
<name>inoguchi</name>
<email></email>
</author>
<published>2022-04-10T12:42:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c694612e6569c6b13f7f2c75a3a1c4d9479509c2'/>
<id>urn:sha1:c694612e6569c6b13f7f2c75a3a1c4d9479509c2</id>
<content type='text'>
'flags' should have ASN1_OBJECT_FLAG_DYNAMIC_DATA bit to free 'data'
by ASN1_OBJECT_free as c2i_ASN1_OBJECT_cbs does.

ok jsing@ tb@
</content>
</entry>
<entry>
<title>Fix leak in ASN1_TIME_adj_internal()</title>
<updated>2022-03-31T13:04:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-03-31T13:04:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=31dad1243d69de787b0589750cc4b78379c43734'/>
<id>urn:sha1:31dad1243d69de787b0589750cc4b78379c43734</id>
<content type='text'>
p is allocated by asprintf() in one of the *_from_tm() functions, so
it needs to be freed as in the other error path below.

CID 346194

ok jsing
</content>
</entry>
<entry>
<title>Convert c2i_ASN1_OBJECT() and d2i_ASN1_OBJECT to CBS.</title>
<updated>2022-03-26T14:54:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-26T14:54:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=20c8d5e654c79295ab91cfcd49160d5d096494bd'/>
<id>urn:sha1:20c8d5e654c79295ab91cfcd49160d5d096494bd</id>
<content type='text'>
Along the way, rather than having yet another piece of code that parses
OID arcs, reuse oid_parse_arc(). Always allocate a new ASN1_OBJECT rather
than doing a crazy dance with ASN1_OBJECT_FLAG_DYNAMIC and trying to free
parts of an ASN1_OBJECT if one is passed in.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Provide asn1_get_primitive()</title>
<updated>2022-03-26T14:47:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-26T14:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d10bc75275e54a97decc3a71a607af1535e2f2b3'/>
<id>urn:sha1:d10bc75275e54a97decc3a71a607af1535e2f2b3</id>
<content type='text'>
This takes a CBS, gets the ASN.1 identifier and length, ensures the
resulting identifier is a valid primitive, then returns the tag number and
the content as a CBS.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Move/group i2d_ASN1_OBJECT() and d2i_ASN1_OBJECT().</title>
<updated>2022-03-20T13:27:23+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-20T13:27:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=775717706ed7c9e5ad063f73c0e54505da7f01f8'/>
<id>urn:sha1:775717706ed7c9e5ad063f73c0e54505da7f01f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Provide t2i_ASN1_OBJECT_internal() and use it for OBJ_txt2obj()</title>
<updated>2022-03-19T17:49:32+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-19T17:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2b63d13b51dbcbb4817452fa7523918d166ddd55'/>
<id>urn:sha1:2b63d13b51dbcbb4817452fa7523918d166ddd55</id>
<content type='text'>
The current OBJ_txt2obj() implementation converts the text to ASN.1
object content octets, builds a full DER encoding from it, then feeds
the entire thing back through the DER to ASN.1 object conversion. Rather
than doing this crazy dance, provide an t2i_ASN1_OBJECT_internal() function
that converts the text to ASN.1 object content octets, then creates a new
ASN1_OBJECT and attaches the content octets to it.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Rewrite ascii/text to ASN.1 object conversion.</title>
<updated>2022-03-19T17:35:52+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-19T17:35:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9de5efcb223141c12ce6556e822cda9d1d160c25'/>
<id>urn:sha1:9de5efcb223141c12ce6556e822cda9d1d160c25</id>
<content type='text'>
Rewrite the ascii/text to ASN.1 object conversion code using CBB/CBS,
while also addressing some of the bizarre behaviour (such as allowing
mixed separators and treating '..' as a zero value).

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Rework ASN1_STRING_set()</title>
<updated>2022-03-17T17:17:58+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-17T17:17:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=72f47231e7ca2316bbce70318f5d2705b5d11bba'/>
<id>urn:sha1:72f47231e7ca2316bbce70318f5d2705b5d11bba</id>
<content type='text'>
Rework ASN1_STRING_set() so that we always clear and free an existing
allocation, prior to storing the new data. This fixes a number of issues,
including a failure to zero data if the existing allocation was too small.
This also fixes other bugs such as leaving the allocation uninitialised
if NULL is passed for data. Require -1 where strlen() is expected and
improve length and overflow checks.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Initialise *out_name at the start of i2t_ASN1_OBJECT_name().</title>
<updated>2022-03-15T18:47:22+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-15T18:47:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5ad5879113588eef4d693bcf7e8a51f803641921'/>
<id>urn:sha1:5ad5879113588eef4d693bcf7e8a51f803641921</id>
<content type='text'>
ok tb@
</content>
</entry>
<entry>
<title>Factor out ASN1_STRING clearing code.</title>
<updated>2022-03-14T16:35:45+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-14T16:35:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ed6d95418f799a0e00e49deb2fe14e76912fb1d9'/>
<id>urn:sha1:ed6d95418f799a0e00e49deb2fe14e76912fb1d9</id>
<content type='text'>
This fixes a bug in ASN1_STRING_set0() where it does not respect the
ASN1_STRING_FLAG_NDEF flag and potentially frees memory that we do not own.

ok inguchi@ tb@
</content>
</entry>
</feed>
