diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c60c5f7ed..99d306533 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -11638,12 +11638,14 @@ typedef int (*tls_prf_fn)( const unsigned char *secret, size_t slen, unsigned char *dstbuf, size_t dlen ); static tls_prf_fn ssl_tls12prf_from_cs( int ciphersuite_id ) { +#if defined(MBEDTLS_SHA512_C) const mbedtls_ssl_ciphersuite_t * const ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( ciphersuite_id ); -#if defined(MBEDTLS_SHA512_C) if( ciphersuite_info->mac == MBEDTLS_MD_SHA384 ) return( tls_prf_sha384 ); +#else + (void) ciphersuite_id; #endif return( tls_prf_sha256 ); }