Reverting the TLS 1.3 compatibility

Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
This commit is contained in:
TRodziewicz 2021-07-05 16:55:27 +02:00
parent 5b1ea6ee70
commit 302ed2bf7d
2 changed files with 3 additions and 3 deletions

View File

@ -643,7 +643,7 @@ int mbedtls_ssl_encrypt_buf( mbedtls_ssl_context *ssl,
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
}
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
if( transform->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 )
if( transform->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_3 )
{
unsigned char mac[MBEDTLS_SSL_MAC_ADD];
@ -5169,7 +5169,7 @@ static int ssl_handle_hs_message_post_handshake( mbedtls_ssl_context *ssl )
MBEDTLS_SSL_DEBUG_MSG( 3, ( "refusing renegotiation, sending alert" ) );
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 )
if( ssl->minor_ver >= MBEDTLS_SSL_MINOR_VERSION_3 )
{
if( ( ret = mbedtls_ssl_send_alert_message( ssl,
MBEDTLS_SSL_ALERT_LEVEL_WARNING,

View File

@ -948,7 +948,7 @@ static int ssl_populate_transform( mbedtls_ssl_transform *transform,
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_MAC)
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
if( minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 )
if( minor_ver >= MBEDTLS_SSL_MINOR_VERSION_3 )
{
/* For HMAC-based ciphersuites, initialize the HMAC transforms.
For AEAD-based ciphersuites, there is nothing to do here. */