mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 12:39:55 +00:00
Add debug message
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
d099cf0325
commit
f3b46b5082
@ -4923,13 +4923,17 @@ int mbedtls_ssl_parse_sig_alg_ext( mbedtls_ssl_context *ssl,
|
||||
sig_alg = MBEDTLS_GET_UINT16_BE( p, 0 );
|
||||
p += 2;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 4, ( "received signature algorithm: 0x%x",
|
||||
sig_alg ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 4, ( "received signature algorithm: 0x%x %s",
|
||||
sig_alg,
|
||||
mbedtls_ssl_sig_alg_to_str( sig_alg ) ) );
|
||||
|
||||
if( ! mbedtls_ssl_sig_alg_is_supported( ssl, sig_alg ) ||
|
||||
! mbedtls_ssl_sig_alg_is_offered( ssl, sig_alg ) )
|
||||
continue;
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 4, ( "valid signature algorithm: %s",
|
||||
mbedtls_ssl_sig_alg_to_str( sig_alg ) ) );
|
||||
|
||||
if( common_idx + 1 < MBEDTLS_RECEIVED_SIG_ALGS_SIZE )
|
||||
{
|
||||
ssl->handshake->received_sig_algs[common_idx] = sig_alg;
|
||||
@ -8171,7 +8175,9 @@ int mbedtls_ssl_write_sig_alg_ext( mbedtls_ssl_context *ssl, unsigned char *buf,
|
||||
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 );
|
||||
MBEDTLS_PUT_UINT16_BE( *sig_alg, p, 0 );
|
||||
p += 2;
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "signature scheme [%x]", *sig_alg ) );
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "signature scheme [%x] %s",
|
||||
*sig_alg,
|
||||
mbedtls_ssl_sig_alg_to_str( *sig_alg ) ) );
|
||||
}
|
||||
|
||||
/* Length of supported_signature_algorithms */
|
||||
|
@ -951,6 +951,9 @@ static int ssl_tls13_write_certificate_verify_body( mbedtls_ssl_context *ssl,
|
||||
return( MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE );
|
||||
}
|
||||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2, ( "CertificateVerify with %s",
|
||||
mbedtls_ssl_sig_alg_to_str( algorithm )) );
|
||||
|
||||
if( mbedtls_ssl_tls13_get_pk_type_and_md_alg_from_sig_alg(
|
||||
algorithm, &pk_type, &md_alg ) != 0 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user