1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

remove unnecessary test

also optimize check sum

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu
2022-08-29 20:16:09 +08:00
parent e7b4b58403
commit e5834fd0d7

View File

@ -419,14 +419,11 @@ static int ssl_tls13_parse_pre_shared_key_ext( mbedtls_ssl_context *ssl,
matched_identity = identity_id; matched_identity = identity_id;
/* Update handshake parameters */ /* Update handshake parameters */
if( psk_type == MBEDTLS_SSL_TLS1_3_PSK_EXTERNAL ) ssl->session_negotiate->ciphersuite = cipher_suite;
{ ssl->handshake->ciphersuite_info = ciphersuite_info;
ssl->session_negotiate->ciphersuite = cipher_suite; MBEDTLS_SSL_DEBUG_MSG( 2, ( "overwrite ciphersuite: %04x - %s",
ssl->handshake->ciphersuite_info = ciphersuite_info; cipher_suite, ciphersuite_info->name ) );
MBEDTLS_SSL_DEBUG_MSG( 2, ( "overwrite ciphersuite: %04x - %s",
cipher_suite,
ciphersuite_info->name ) );
}
} }
if( p_identity_len != identities_end || p_binder_len != binders_end ) if( p_identity_len != identities_end || p_binder_len != binders_end )
@ -1454,6 +1451,8 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
if( ret < 0 ) if( ret < 0 )
return( ret ); return( ret );
mbedtls_ssl_optimize_checksum( ssl, ssl->handshake->ciphersuite_info );
return( hrr_required ? SSL_CLIENT_HELLO_HRR_REQUIRED : SSL_CLIENT_HELLO_OK ); return( hrr_required ? SSL_CLIENT_HELLO_HRR_REQUIRED : SSL_CLIENT_HELLO_OK );
} }