From fc9c07ff8f1a9486b8327f14cdeb87a5c47b7027 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 12 May 2021 22:51:53 +0200 Subject: [PATCH] Fix unused variable with MBEDTLS_SHA512_NO_SHA384 Signed-off-by: Gilles Peskine --- library/ssl_tls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 168735b7d..ff77d7d39 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -1450,7 +1450,8 @@ static int ssl_set_handshake_prfs( mbedtls_ssl_handshake_params *handshake, int minor_ver, mbedtls_md_type_t hash ) { -#if !defined(MBEDTLS_SSL_PROTO_TLS1_2) || !defined(MBEDTLS_SHA512_C) +#if !defined(MBEDTLS_SSL_PROTO_TLS1_2) || \ + !( defined(MBEDTLS_SHA512_C) && !defined(MBEDTLS_SHA512_NO_SHA384) ) (void) hash; #endif