From ef495c78dd918a7c7fe60a2d919918cecb889bcb Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 13 Jan 2017 21:05:19 +0200 Subject: [PATCH] OpenSSL: Implement sha384_vector() This was forgotten from the addition of SHA384 support and is now needed for FILS. Signed-off-by: Jouni Malinen --- src/crypto/crypto_openssl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index b3d1b07a7..02cb391bc 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -109,6 +109,9 @@ static BIGNUM * get_group5_prime(void) #ifdef OPENSSL_NO_SHA256 #define NO_SHA256_WRAPPER #endif +#ifdef OPENSSL_NO_SHA512 +#define NO_SHA384_WRAPPER +#endif static int openssl_digest_vector(const EVP_MD *type, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) @@ -242,6 +245,14 @@ int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, } #endif /* NO_SHA256_WRAPPER */ +#ifndef NO_SHA384_WRAPPER +int sha384_vector(size_t num_elem, const u8 *addr[], const size_t *len, + u8 *mac) +{ + return openssl_digest_vector(EVP_sha384(), num_elem, addr, len, mac); +} +#endif /* NO_SHA384_WRAPPER */ + static const EVP_CIPHER * aes_get_evp_cipher(size_t keylen) {