Fix compiler warning
Fix a compiler warning when MBEDTLS_SHA512_C isn't defined.
This commit is contained in:
parent
8c51b7cd94
commit
b7b486cfd1
1 changed files with 3 additions and 1 deletions
|
@ -11638,12 +11638,14 @@ typedef int (*tls_prf_fn)( const unsigned char *secret, size_t slen,
|
||||||
unsigned char *dstbuf, size_t dlen );
|
unsigned char *dstbuf, size_t dlen );
|
||||||
static tls_prf_fn ssl_tls12prf_from_cs( int ciphersuite_id )
|
static tls_prf_fn ssl_tls12prf_from_cs( int ciphersuite_id )
|
||||||
{
|
{
|
||||||
|
#if defined(MBEDTLS_SHA512_C)
|
||||||
const mbedtls_ssl_ciphersuite_t * const ciphersuite_info =
|
const mbedtls_ssl_ciphersuite_t * const ciphersuite_info =
|
||||||
mbedtls_ssl_ciphersuite_from_id( ciphersuite_id );
|
mbedtls_ssl_ciphersuite_from_id( ciphersuite_id );
|
||||||
|
|
||||||
#if defined(MBEDTLS_SHA512_C)
|
|
||||||
if( ciphersuite_info->mac == MBEDTLS_MD_SHA384 )
|
if( ciphersuite_info->mac == MBEDTLS_MD_SHA384 )
|
||||||
return( tls_prf_sha384 );
|
return( tls_prf_sha384 );
|
||||||
|
#else
|
||||||
|
(void) ciphersuite_id;
|
||||||
#endif
|
#endif
|
||||||
return( tls_prf_sha256 );
|
return( tls_prf_sha256 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue