mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Remove the duplicate early_data_status check
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com>
This commit is contained in:
@ -2063,14 +2063,6 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
#if defined(MBEDTLS_SSL_EARLY_DATA)
|
||||||
case MBEDTLS_TLS_EXT_EARLY_DATA:
|
case MBEDTLS_TLS_EXT_EARLY_DATA:
|
||||||
if( ssl->early_data_status != MBEDTLS_SSL_EARLY_DATA_STATUS_INDICATION_SENT )
|
|
||||||
{
|
|
||||||
/* The server must not send the EarlyDataIndication if the
|
|
||||||
* client hasn't indicated the use of early data. */
|
|
||||||
MBEDTLS_SSL_PEND_FATAL_ALERT( MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER,
|
|
||||||
MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
|
||||||
return( MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( extension_data_len != 0 )
|
if( extension_data_len != 0 )
|
||||||
{
|
{
|
||||||
@ -2080,7 +2072,7 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
|
|||||||
return( MBEDTLS_ERR_SSL_DECODE_ERROR );
|
return( MBEDTLS_ERR_SSL_DECODE_ERROR );
|
||||||
}
|
}
|
||||||
|
|
||||||
ssl->early_data_status = MBEDTLS_SSL_EARLY_DATA_STATUS_ACCEPTED;
|
ssl->early_data_status = MBEDTLS_SSL_EARLY_DATA_STATUS_ACCEPTED;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif /* MBEDTLS_SSL_EARLY_DATA */
|
#endif /* MBEDTLS_SSL_EARLY_DATA */
|
||||||
|
Reference in New Issue
Block a user