<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/asn1/a_int.c, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<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>Hide global _it variables in asn1.h</title>
<updated>2024-07-08T14:52:31+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2024-07-08T14:52:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3e4afb686e802ed188471899b25a031f4c4164af'/>
<id>urn:sha1:3e4afb686e802ed188471899b25a031f4c4164af</id>
<content type='text'>
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>Encode an ASN.1 INTEGER with NULL data to value of zero.</title>
<updated>2022-08-28T17:49:25+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-08-28T17:49:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d065cbde3ee64dd2a8aff25147e1c4eaebac2787'/>
<id>urn:sha1:d065cbde3ee64dd2a8aff25147e1c4eaebac2787</id>
<content type='text'>
When an ASN1_INTEGER is created it has NULL data until a value is set -
previously, an ASN1_INTEGER in this state encoded to an ASN.1 INTEGER with
a value of 0, rather than being treated as an error. While code should
really set values, the historical behaviour has not required this.

Found the hard way by sthen@ with acme-client.

ok tb@
</content>
</entry>
<entry>
<title>Rewrite i2c_ASN1_INTEGER() using CBB/CBS.</title>
<updated>2022-08-20T18:17:33+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-08-20T18:17:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f5720b925d89e12dd347d93f073d631d437b6a8a'/>
<id>urn:sha1:f5720b925d89e12dd347d93f073d631d437b6a8a</id>
<content type='text'>
This gives us cleaner and safer code, although it is worth noting that we
now generate the encoding even when called with NULL as the output pointer
(and then discard it, returning just the length).

Resolves oss-fuzz #49963.

ok tb@
</content>
</entry>
<entry>
<title>Cast int64_t to uint64_t before negating.</title>
<updated>2022-07-13T20:07:44+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-07-13T20:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aab46b2cb1dcc736abbfa0465c423ddc885c72e9'/>
<id>urn:sha1:aab46b2cb1dcc736abbfa0465c423ddc885c72e9</id>
<content type='text'>
Avoid undefined behaviour/integer overflow by casting an int64_t to
uint64_t before negating.

Fixes oss-fuzz #49043

ok tb@
</content>
</entry>
<entry>
<title>Make ASN1_{INTEGER,ENUMERATED}_get() return 0 on NULL again</title>
<updated>2022-07-09T14:46:43+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-07-09T14:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=40868ef62b1c990379f28b723127ae704c232772'/>
<id>urn:sha1:40868ef62b1c990379f28b723127ae704c232772</id>
<content type='text'>
This is the documented behavior which got lost in the recent rewrite.

Mismatch of documentation and reality pointed out by schwarze

ok jsing
</content>
</entry>
<entry>
<title>Negate unsigned then cast to signed.</title>
<updated>2022-06-28T19:44:28+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-06-28T19:44:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4edad9b6e581e10291c227e2c7fb1f3a7a686cde'/>
<id>urn:sha1:4edad9b6e581e10291c227e2c7fb1f3a7a686cde</id>
<content type='text'>
Avoid undefined behaviour by negating the unsigned value, before casting
to int64_t, rather than casting to int64_t then negating.

Fixes oss-fuzz #48499

ok tb@
</content>
</entry>
<entry>
<title>Rewrite ASN1_INTEGER_{get,set}() using CBS/CBB</title>
<updated>2022-06-25T15:39:12+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-06-25T15:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8ef1a055f89d01f797688b3e5e91fe78b910d79d'/>
<id>urn:sha1:8ef1a055f89d01f797688b3e5e91fe78b910d79d</id>
<content type='text'>
In the process, prepare to provide ASN1_INTEGER_{get,set}_{u,}int64().

ok beck@ tb@
</content>
</entry>
<entry>
<title>Simplify ASN1_INTEGER_cmp()</title>
<updated>2022-06-25T14:22:54+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-06-25T14:22:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f9ccf4bd285d47f617c1d7f0c47ed130881a289d'/>
<id>urn:sha1:f9ccf4bd285d47f617c1d7f0c47ed130881a289d</id>
<content type='text'>
ok beck@ tb@
</content>
</entry>
</feed>
