From aeecd4eaec6939562b6e5815795b117f7eaa2b9f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 16 Feb 2017 20:38:09 +0200 Subject: [PATCH] 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 --- src/crypto/crypto_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }