mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Match parameter check in TLS 1.3 populate transform to 1.2 version
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
@@ -719,12 +719,19 @@ int mbedtls_ssl_tls13_populate_transform( mbedtls_ssl_transform *transform,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( ciphersuite );
|
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( ciphersuite );
|
||||||
|
if( ciphersuite_info == NULL )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "ciphersuite info for %d not found",
|
||||||
|
ciphersuite ) );
|
||||||
|
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA );
|
||||||
|
}
|
||||||
|
|
||||||
cipher_info = mbedtls_cipher_info_from_type( ciphersuite_info->cipher );
|
cipher_info = mbedtls_cipher_info_from_type( ciphersuite_info->cipher );
|
||||||
if( cipher_info == NULL )
|
if( cipher_info == NULL )
|
||||||
{
|
{
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 1, ( "should never happen" ) );
|
MBEDTLS_SSL_DEBUG_MSG( 1, ( "cipher info for %u not found",
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
ciphersuite_info->cipher ) );
|
||||||
|
return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA )
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user