mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
TLS 1.3: Remove unnecessary key exchange mode check
If there is a PSK involved in the key exchange and thus no certificate we do not go through the MBEDTLS_SSL_CERTIFICATE_REQUEST state thus there is no reason to check that in the coordination function of that state. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@ -1512,12 +1512,6 @@ static int ssl_tls13_certificate_request_coordinate( mbedtls_ssl_context *ssl )
|
|||||||
{
|
{
|
||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
|
|
||||||
if( mbedtls_ssl_tls13_some_psk_enabled( ssl ) )
|
|
||||||
{
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "<= skip parse certificate request" ) );
|
|
||||||
return( SSL_CERTIFICATE_REQUEST_SKIP );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( ( ret = mbedtls_ssl_read_record( ssl, 0 ) ) != 0 )
|
if( ( ret = mbedtls_ssl_read_record( ssl, 0 ) ) != 0 )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
|
MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_ssl_read_record", ret );
|
||||||
|
Reference in New Issue
Block a user