]> git.ipfire.org Git - thirdparty/hostap.git/commit
OpenSSL: Fix crypto_bignum_to_bin() with padlen == 0
authorJouni Malinen <j@w1.fi>
Sat, 3 Aug 2019 13:28:02 +0000 (16:28 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 3 Aug 2019 13:28:02 +0000 (16:28 +0300)
commitc65168ccd29c0f0b841342e79c50575a00d0f60e
tree645b6ce763515b1a39ad86c10d66ea2a5e518341
parentcb28bd52e1f0300c128d96cc57127c1319100a24
OpenSSL: Fix crypto_bignum_to_bin() with padlen == 0

The earlier change to add support for BN_bn2binpad() and
BN_bn2bin_padded() broke this function for cases where no padding is
used (padlen == 0). Those would have always failed after the changes and
the function would return -1. There are no such cases in the current
hostap.git, so this did not have any real issues, but anyway, better fix
this function to match its documentation.

Fixes: 1e237903f5b5 ("OpenSSL: Use BN_bn2binpad() or BN_bn2bin_padded() if available")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto_openssl.c