<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libcrypto/hmac, branch libressl-v3.7.0</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=libressl-v3.7.0</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=libressl-v3.7.0'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2022-11-26T16:08:57+00:00</updated>
<entry>
<title>Make internal header file names consistent</title>
<updated>2022-11-26T16:08:57+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-26T16:08:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=81d98bf600a381a625eb11b39a725b08c0ba547f'/>
<id>urn:sha1:81d98bf600a381a625eb11b39a725b08c0ba547f</id>
<content type='text'>
Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include &lt;ssl_locl.h&gt; was fixed manually.

discussed with jsing,
no objection bcook
</content>
</entry>
<entry>
<title>Unindent and check some pointers explicitly against NULL</title>
<updated>2022-11-19T04:36:52+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-19T04:36:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8831f9c4bf55f1c9f5ae60a9f4804c7c6c20e909'/>
<id>urn:sha1:8831f9c4bf55f1c9f5ae60a9f4804c7c6c20e909</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove HMAC PRIVATE KEY support</title>
<updated>2022-11-19T04:32:49+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-19T04:32:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6b2aef44098a53fcc9f6533d8defd1257fff1055'/>
<id>urn:sha1:6b2aef44098a53fcc9f6533d8defd1257fff1055</id>
<content type='text'>
This is an undocumented feature of openssl genpkey for testing purposes.
Emilia removed support for this 'bogus private key format' from OpenSSL
in 2017 in commit c26f655fdd18ac19016c1c0496105f5256a1e84d.

ok jsing
</content>
</entry>
<entry>
<title>Check os for NULL before dereferencing it</title>
<updated>2022-11-18T20:03:36+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-18T20:03:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=8e2bde89a5d1bb3002c8a910a07e727c01f37646'/>
<id>urn:sha1:8e2bde89a5d1bb3002c8a910a07e727c01f37646</id>
<content type='text'>
Avoids a segfault when both priv == NULL and os == NULL.

ok miod
</content>
</entry>
<entry>
<title>Include bytestring.h directly rather than pulling it in via asn1_locl.h</title>
<updated>2022-11-18T15:10:51+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-18T15:10:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=6c4a21938605b81ccd046aff2a7db341ac1b6578'/>
<id>urn:sha1:6c4a21938605b81ccd046aff2a7db341ac1b6578</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Wire up HMAC to raw private key methods</title>
<updated>2022-11-18T15:01:04+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-18T15:01:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4ac94b93f062b2c44f969dc6f9f4eda7a744a023'/>
<id>urn:sha1:4ac94b93f062b2c44f969dc6f9f4eda7a744a023</id>
<content type='text'>
Obviously, the brilliant API design kitchen decided that an interface
carrying public and private key in its name (so that every sane person
thinks of asymmetric cryptography), is also perfectly suitable for MACs.
Wire up HMAC since Ruby's OpenSSL gem uses these bindings if the build
system detects that EVP_PKEY_new_raw_public_key() is available in evp.h.

While there, also add the missing pub_cmp() ameth, which obviously
treats two things as equal by returning 1.

Reported by jeremy and anton, fixes regress/lib/libssl/openssl-ruby tests

ok jsing
</content>
</entry>
<entry>
<title>Change the pkey.ptr from char * to void *</title>
<updated>2022-11-18T14:45:10+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-18T14:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=3ceb42d62047d438cd7b6b6a201682452faf30fc'/>
<id>urn:sha1:3ceb42d62047d438cd7b6b6a201682452faf30fc</id>
<content type='text'>
Now that EVP_PKEY is opaque, there is no reason to keep the ptr member
of the pkey union as a weird char pointer, a void pointer will do. This
avoids a few stupid casts and simplifies an upcoming diff.

ok jsing
</content>
</entry>
<entry>
<title>Add support for symbol hiding disabled by default.</title>
<updated>2022-11-11T11:25:18+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2022-11-11T11:25:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0ba6b15619d4e4feafccdbd0226ee99b70553a11'/>
<id>urn:sha1:0ba6b15619d4e4feafccdbd0226ee99b70553a11</id>
<content type='text'>
Fully explained in libcrypto/README. TL;DR make sure libcrypto
and libssl's function calls internally and to each other are via
symbol names that won't get overridden by linking other libraries.

Mostly work by guenther@, which will currently be gated behind a
build setting NAMESPACE=yes. once we convert all the symbols to
this method we will do a major bump and pick up the changes.

ok tb@ jsing@
</content>
</entry>
<entry>
<title>Fix HMAC() with NULL key</title>
<updated>2022-05-05T18:29:34+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-05-05T18:29:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5ca6164aa9bf6ef7aa404bf1f75a806912d87c26'/>
<id>urn:sha1:5ca6164aa9bf6ef7aa404bf1f75a806912d87c26</id>
<content type='text'>
If a NULL key is passed to HMAC_Init_ex(), it tries to reuse the
previous key. This makes no sense inside HMAC() since the HMAC_CTX
has no key set yet. This is hit by HKDF() with NULL salt() via the
EVP API and results in a few Wycheproof test failures. If key is
NULL, use a zero length dummy key.

This was not hit from wycheproof.go since we pass a []byte with a
single NUL from Go.

Matches OpenSSL if key is NULL and key_len is 0. If key_len != 0,
OpenSSL will still fail by passing a NULL key which makes no sense,
so set key_len to 0 instead.

ok beck jsing
</content>
</entry>
<entry>
<title>Avoid segfaults in EVP_PKEY_CTX_free()</title>
<updated>2022-03-30T07:17:48+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-03-30T07:17:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=c650ef2b4f969ce6b8d9a39f9e86c5e181dfafbc'/>
<id>urn:sha1:c650ef2b4f969ce6b8d9a39f9e86c5e181dfafbc</id>
<content type='text'>
It is possible to call pmeth-&gt;cleanup() with an EVP_PKEY_CTX whose data
is NULL. If pmeth-&gt;init() in int_ctx_new() fails, EVP_PKEY_CTX_free() is
called with such a context. This in turn calls pmeth-&gt;cleanup(), and thus
these cleanup functions must be careful not to use NULL data.  Most of
them are, but one of GOST's functions and HMAC's aren't.

Reported for HMAC by Masaru Masada
https://github.com/libressl-portable/openbsd/issues/129

ok bcook jsing
</content>
</entry>
</feed>
