summaryrefslogtreecommitdiff
path: root/regress/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-05-05 18:29:35 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-05-05 18:29:35 +0000
commit83116735fbe0c22562f860bfa7171a976581efef (patch)
tree099e0921af330290c080c12aa1e0ec7edbe2cbd6 /regress/lib
parentb1fd359239a96f264a2caf0c5ba7bfa25d45419c (diff)
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 'regress/lib')
0 files changed, 0 insertions, 0 deletions