From: Jouni Malinen Date: Thu, 16 Feb 2017 18:38:09 +0000 (+0200) Subject: OpenSSL: Fix hmac_sha384_vector() implementation X-Git-Tag: hostap_2_7~1581 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeecd4eaec6939562b6e5815795b117f7eaa2b9f;p=thirdparty%2Fhostap.git OpenSSL: Fix hmac_sha384_vector() implementation The output length was incorrect (32 from the copy-pasted SHA256 version). Fix this to return the correct number of octets (48) for SHA384. This fixes incorrect key derivation in FILS when using the SHA384-based AKM. Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index b5ffeea08..5f7896c85 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -1031,7 +1031,7 @@ int hmac_sha384_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { return openssl_hmac_vector(EVP_sha384(), key, key_len, num_elem, addr, - len, mac, 32); + len, mac, 48); }