Fix compiler warning
Fix a compiler warning when MBEDTLS_SHA512_C isn't defined.
@@ -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 );
}
