mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Use common macro for the invalid signiture algorithm botn in TLS 1.2 and 1.3
Introduce a new macro MBEDTLS_TLS_SIG_NONE for invalid signiture algorithm. It is intended to use in common code of TLS 1.2 and 1.3. Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
This commit is contained in:
@ -1632,7 +1632,7 @@ read_record_header:
|
||||
uint16_t *set = ssl->handshake->received_sig_algs;
|
||||
const uint16_t sig_algs[] = {
|
||||
MBEDTLS_SSL_SIG_ALG_SET( MBEDTLS_SSL_HASH_SHA1 )
|
||||
MBEDTLS_SSL_SIG_ALG( MBEDTLS_SSL_SIG_ANON, MBEDTLS_SSL_HASH_NONE )
|
||||
MBEDTLS_TLS_SIG_NONE
|
||||
};
|
||||
size_t count = sizeof( sig_algs ) / sizeof( sig_algs[0] );
|
||||
|
||||
@ -2647,7 +2647,7 @@ static int ssl_write_certificate_request( mbedtls_ssl_context *ssl )
|
||||
if( sig_alg == NULL )
|
||||
return( MBEDTLS_ERR_SSL_BAD_CONFIG );
|
||||
|
||||
for( ; *sig_alg != MBEDTLS_TLS1_3_SIG_NONE; sig_alg++ )
|
||||
for( ; *sig_alg != MBEDTLS_TLS_SIG_NONE; sig_alg++ )
|
||||
{
|
||||
unsigned char hash = MBEDTLS_BYTE_1( *sig_alg );
|
||||
|
||||
|
Reference in New Issue
Block a user