diff options
author | tb <> | 2022-05-05 18:29:34 +0000 |
---|---|---|
committer | tb <> | 2022-05-05 18:29:34 +0000 |
commit | 5ca6164aa9bf6ef7aa404bf1f75a806912d87c26 (patch) | |
tree | 258f59832824a7ff97bca4ce631bdf8cae8bf0c4 /src/lib/libcrypto/dsa/dsa_vrf.c | |
parent | 14561e7c4537eee9ff1f86cc079c74e822b7b9e0 (diff) | |
download | openbsd-5ca6164aa9bf6ef7aa404bf1f75a806912d87c26.tar.gz openbsd-5ca6164aa9bf6ef7aa404bf1f75a806912d87c26.tar.bz2 openbsd-5ca6164aa9bf6ef7aa404bf1f75a806912d87c26.zip |
Fix HMAC() with NULL key
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
Diffstat (limited to 'src/lib/libcrypto/dsa/dsa_vrf.c')
0 files changed, 0 insertions, 0 deletions