mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-07 13:22:46 +00:00
Refactor encrypted extensions
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
63a459cde5
commit
9eba750916
@ -1989,7 +1989,7 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
|
|||||||
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, extensions_len );
|
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, extensions_len );
|
||||||
extensions_end = p + extensions_len;
|
extensions_end = p + extensions_len;
|
||||||
|
|
||||||
handshake->received_extensions = MBEDTLS_SSL_EXT_NONE;
|
handshake->received_extensions = MBEDTLS_SSL_EXT_MASK_NONE;
|
||||||
|
|
||||||
while( p < extensions_end )
|
while( p < extensions_end )
|
||||||
{
|
{
|
||||||
@ -2029,18 +2029,16 @@ static int ssl_tls13_parse_encrypted_extensions( mbedtls_ssl_context *ssl,
|
|||||||
break;
|
break;
|
||||||
#endif /* MBEDTLS_SSL_ALPN */
|
#endif /* MBEDTLS_SSL_ALPN */
|
||||||
default:
|
default:
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3,
|
MBEDTLS_SSL_PRINT_EXT_TYPE(
|
||||||
( "encrypted extensions: received %s(%u) extension ( ignored )",
|
3, MBEDTLS_SSL_HS_ENCRYPTED_EXTENSIONS,
|
||||||
mbedtls_tls13_get_extension_name( extension_type ),
|
extension_type, "( ignored )" );
|
||||||
extension_type ) );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
p += extension_data_len;
|
p += extension_data_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
MBEDTLS_SSL_TLS1_3_PRINT_EXTS( 3, MBEDTLS_SSL_HS_ENCRYPTED_EXTENSIONS,
|
MBEDTLS_SSL_PRINT_RECEIVED_EXTS( 3, MBEDTLS_SSL_HS_ENCRYPTED_EXTENSIONS );
|
||||||
handshake->received_extensions );
|
|
||||||
|
|
||||||
/* Check that we consumed all the message. */
|
/* Check that we consumed all the message. */
|
||||||
if( p != end )
|
if( p != end )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user