summaryrefslogtreecommitdiff
path: root/src/usr.bin/nc
diff options
context:
space:
mode:
authortb <>2022-05-05 18:29:34 +0000
committertb <>2022-05-05 18:29:34 +0000
commite2b1ff706bb7ee07a20d8b6c0a20b7a36dbdbac4 (patch)
tree258f59832824a7ff97bca4ce631bdf8cae8bf0c4 /src/usr.bin/nc
parent84103403c54ab18df3b04c64b3d2007b5664ad62 (diff)
downloadopenbsd-e2b1ff706bb7ee07a20d8b6c0a20b7a36dbdbac4.tar.gz
openbsd-e2b1ff706bb7ee07a20d8b6c0a20b7a36dbdbac4.tar.bz2
openbsd-e2b1ff706bb7ee07a20d8b6c0a20b7a36dbdbac4.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/usr.bin/nc')
0 files changed, 0 insertions, 0 deletions