<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/buffer, branch master</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=master</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=master'/>
<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>libcrypto: constify most error string tables</title>
<updated>2024-06-24T06:43:23+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-06-24T06:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c9802a5afe29675d69b605ce906d34fd89c024ac'/>
<id>urn:sha1:c9802a5afe29675d69b605ce906d34fd89c024ac</id>
<content type='text'>
These constitute the bulk of the remaining global mutable state in
libcrypto. This commit moves most of them into data.rel.ro, leaving
out ERR_str_{functs,libraries,reasons} (which require a slightly
different approach) and SYS_str_reasons which is populated on startup.

The main observation is that if ERR_load_strings() is called with a 0 lib
argument, the ERR_STRING_DATA argument is not actually modified. We could
use this fact to cast away const on the caller side and be done with it.
We can make this cleaner by adding a helper ERR_load_const_strings() which
explicitly avoids the assignment to str-&gt;error overriding the error code
already set in the table.

In order for this to work, we need to sprinkle some const in err/err.c.
CMS called ERR_load_strings() with non-0 lib argument, but this didn't
actually modify the error data since it ored in the value already stored
in the table.

Annoyingly, we need to cast const away once, namely in the call to
lh_insert() in int_err_set_item(). Fixing this would require changing
the public API and is going to be tricky since it requires that the
LHASH_DOALL_FN_* types adjust.

ok jsing
</content>
</entry>
<entry>
<title>Remove BUF_[a-z]* API</title>
<updated>2023-07-28T10:17:21+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-28T10:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e393551162848dd712d0c5a922f6ef5522fb5ca2'/>
<id>urn:sha1:e393551162848dd712d0c5a922f6ef5522fb5ca2</id>
<content type='text'>
This are a bunch of strange string handlers with NULL checks that make
no real sense except to some devs who like to sprinkle them everywhere.
Fortunately, nothing uses these anymore, so they can go.

ok jsing
</content>
</entry>
<entry>
<title>Hide symbols in cms, comp, conf, and buffer</title>
<updated>2023-07-08T08:26:26+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-08T08:26:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cf9b236f0893157746f8b944e4f6cc8d8a6aca26'/>
<id>urn:sha1:cf9b236f0893157746f8b944e4f6cc8d8a6aca26</id>
<content type='text'>
ok jsing@
</content>
</entry>
<entry>
<title>Remove mkerr.pl remnants from LibreSSL</title>
<updated>2022-07-12T14:42:50+00:00</updated>
<author>
<name>kn</name>
<email></email>
</author>
<published>2022-07-12T14:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=89e42d5857196a8071fbafb5565388d0e20ec32b'/>
<id>urn:sha1:89e42d5857196a8071fbafb5565388d0e20ec32b</id>
<content type='text'>
This script is not used at all and files are edited by hand instead.
Thus remove misleading comments incl. the obsolete script/config.

Feedback OK jsing tb
</content>
</entry>
<entry>
<title>use freezero() instead of memset/explicit_bzero + free.  Substantially</title>
<updated>2017-05-02T03:59:45+00:00</updated>
<author>
<name>deraadt</name>
<email></email>
</author>
<published>2017-05-02T03:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5904cc0e04409fde39a97e6580535da34eeb4291'/>
<id>urn:sha1:5904cc0e04409fde39a97e6580535da34eeb4291</id>
<content type='text'>
reduces conditional logic (-218, +82).

MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH cache alignment calculation bn/bn_exp.c
wasn'tt quite right.  Two other tricky bits with ASN1_STRING_FLAG_NDEF and
BN_FLG_STATIC_DATA where the condition cannot be collapsed completely.

Passes regress.  ok beck
</content>
</entry>
<entry>
<title>Simplify/clean up BUF_MEM_grow_clean().</title>
<updated>2017-04-09T15:06:20+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-04-09T15:06:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=61a0ac2c484da4166c337dbca9320e02b154e878'/>
<id>urn:sha1:61a0ac2c484da4166c337dbca9320e02b154e878</id>
<content type='text'>
ok beck@
</content>
</entry>
<entry>
<title>With recallocarray() BUF_MEM_grow() is essentially the same as</title>
<updated>2017-04-09T15:03:54+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-04-09T15:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c18a3c3d8006e8fe739bdbf116e38519ac9c22fe'/>
<id>urn:sha1:c18a3c3d8006e8fe739bdbf116e38519ac9c22fe</id>
<content type='text'>
BUF_MEM_grow_clean() (the only difference is clearing on internal down
sizing), so make it a wrapper.

ok beck@ deraadt@
</content>
</entry>
<entry>
<title>Explicitly test for NULL.</title>
<updated>2017-04-09T14:33:21+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-04-09T14:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4220e499321dbc219cf621050c4ca53082fc2749'/>
<id>urn:sha1:4220e499321dbc219cf621050c4ca53082fc2749</id>
<content type='text'>
ok beck@
</content>
</entry>
<entry>
<title>Convert BUF_MEM_grow() and BUF_MEM_grow_clean() to recallocarray(),</title>
<updated>2017-03-16T13:29:56+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-03-16T13:29:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=66f094ce01d467fcd73cec6745bae67a846e549a'/>
<id>urn:sha1:66f094ce01d467fcd73cec6745bae67a846e549a</id>
<content type='text'>
ensuring that the buffer contents are zeroed on allocation and not leaked
when resizing.

It is worth noting that BUF_MEM_grow_clean() already did this manually by
avoiding realloc().

ok beck@ inoguchi@
</content>
</entry>
</feed>
