From c2f13a05680247b939079f0d02af8c02f89b85e8 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Mon, 7 Mar 2022 10:25:24 +0100 Subject: [PATCH] ssl_tls.c: Modify mbedtls_ssl_set_calc_verify_md() Modify mbedtls_ssl_set_calc_verify_md() taking into account that it is an TLS 1.2 only function. Signed-off-by: Ronald Cron --- library/ssl_tls.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c4a9a29b9..82dd7b59d 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5462,10 +5462,6 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ) int mbedtls_ssl_set_calc_verify_md( mbedtls_ssl_context *ssl, int md ) { -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - if( ssl->minor_ver != MBEDTLS_SSL_MINOR_VERSION_3 ) - return( -1 ); - switch( md ) { #if defined(MBEDTLS_SHA384_C) @@ -5482,13 +5478,7 @@ int mbedtls_ssl_set_calc_verify_md( mbedtls_ssl_context *ssl, int md ) return( -1 ); } - return 0; -#else /* !MBEDTLS_SSL_PROTO_TLS1_2 */ - (void) ssl; - (void) md; - - return( -1 ); -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ + return( 0 ); } #if defined(MBEDTLS_SHA256_C)