Avoid unused variable warning in TLS 1.3 PSK binder calculation

Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
Hanno Becker 2021-05-26 09:29:49 +01:00
parent c8d3ccd67b
commit 28e5f1ed57

View file

@ -628,6 +628,11 @@ int mbedtls_ssl_tls1_3_create_psk_binder( mbedtls_ssl_context *ssl,
mbedtls_md_info_t const *md_info = mbedtls_md_info_from_type( md_type );
size_t const md_size = mbedtls_md_get_size( md_info );
#if !defined(MBEDTLS_DEBUG_C)
ssl = NULL; /* make sure we don't use it except for debug */
((void) ssl);
#endif
/* We should never call this function with an unknown hash,
* but add an assertion anyway. */
if( md_info == 0 )