mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-27 06:41:08 +00:00
fix various issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
0e5bcb6bf5
commit
2d0bd32982
@ -1133,7 +1133,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
|
||||
if( ( ret = ssl_write_sig_alg_ext( ssl, p + 2 + ext_len,
|
||||
end, &olen ) ) != 0 )
|
||||
{
|
||||
MBEDTLS_SSL_DEBUG_RET( 1, "ssl_write_sig_algs_ext", ret );
|
||||
MBEDTLS_SSL_DEBUG_RET( 1, "ssl_write_sig_alg_ext", ret );
|
||||
return( ret );
|
||||
}
|
||||
ext_len += olen;
|
||||
|
@ -1821,12 +1821,12 @@ static inline const void *mbedtls_ssl_conf_get_sig_algs(
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
||||
if( mbedtls_ssl_conf_is_tls12_only( conf ))
|
||||
if( mbedtls_ssl_conf_is_tls12_enabled( conf ))
|
||||
return( conf->sig_hashes );
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */
|
||||
|
||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||
if( mbedtls_ssl_conf_is_tls13_only( conf ))
|
||||
if( mbedtls_ssl_conf_is_tls13_enabled( conf ))
|
||||
return( conf->tls13_sig_algs );
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||
|
||||
|
@ -284,12 +284,12 @@ static void ssl_tls13_create_verify_structure( const unsigned char *transcript_h
|
||||
}
|
||||
|
||||
static int ssl_tls13_sig_alg_is_offered( const mbedtls_ssl_context *ssl,
|
||||
uint16_t received_sig_alg )
|
||||
uint16_t proposed_sig_alg )
|
||||
{
|
||||
for( const uint16_t *sig_alg = mbedtls_ssl_conf_get_sig_algs( ssl->conf );
|
||||
*sig_alg != MBEDTLS_TLS1_3_SIG_NONE; sig_alg++ )
|
||||
{
|
||||
if( *sig_alg == received_sig_alg )
|
||||
if( *sig_alg == proposed_sig_alg )
|
||||
return( 1 );
|
||||
}
|
||||
return( 0 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user