]> git.ipfire.org Git - thirdparty/hostap.git/commit
OpenSSL: Handle EVP_PKEY_derive() secret_len changes for ECDH
authorJouni Malinen <j@w1.fi>
Sun, 4 Aug 2019 12:03:08 +0000 (15:03 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 4 Aug 2019 12:03:08 +0000 (15:03 +0300)
commitd001fe31ab0a3e7619484c4a6a3aa5a85cd81816
treee6ae1ea42cedb4bfdbded3455a5efde03f5598ac
parent29ef1c5ee4c1251aa3a70cb45af6888deba040f8
OpenSSL: Handle EVP_PKEY_derive() secret_len changes for ECDH

It looks like EVP_PKEY_derive() may change the returned length of the
buffer from the initial length determination (NULL buffer) to the
fetching of the value. Handle this by updating the secret length based
on the second call instead of the first one. This fixes some cases where
ECDH result has been used with extra data (zeros in the end) with OWE or
FILS PFS.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto_openssl.c