mirror of
https://github.com/cuberite/polarssl.git
synced 2025-12-09 15:24:32 -05:00
Add tls12 algorithms in hybrid mode client hello
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
5ef71f2723
commit
d4a71a57a8
@ -8179,14 +8179,22 @@ int mbedtls_ssl_write_sig_alg_ext( mbedtls_ssl_context *ssl, unsigned char *buf,
|
|||||||
|
|
||||||
for( ; *sig_alg != MBEDTLS_TLS1_3_SIG_NONE; sig_alg++ )
|
for( ; *sig_alg != MBEDTLS_TLS1_3_SIG_NONE; sig_alg++ )
|
||||||
{
|
{
|
||||||
if( ! mbedtls_ssl_sig_alg_is_supported( ssl, *sig_alg ) )
|
if( mbedtls_ssl_sig_alg_is_supported( ssl, *sig_alg ) ||
|
||||||
continue;
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_2) && defined(MBEDTLS_SSL_PROTO_TLS1_3)
|
||||||
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 );
|
( mbedtls_ssl_conf_is_hybrid_tls12_tls13( ssl->conf ) &&
|
||||||
MBEDTLS_PUT_UINT16_BE( *sig_alg, p, 0 );
|
ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT &&
|
||||||
p += 2;
|
mbedtls_ssl_tls12_sig_alg_is_supported( *sig_alg ) ) ||
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "signature scheme [%x] %s",
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_2 && MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||||
|
0 )
|
||||||
|
{
|
||||||
|
MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 );
|
||||||
|
MBEDTLS_PUT_UINT16_BE( *sig_alg, p, 0 );
|
||||||
|
p += 2;
|
||||||
|
MBEDTLS_SSL_DEBUG_MSG( 3,
|
||||||
|
( "sent signature scheme [%x] %s",
|
||||||
*sig_alg,
|
*sig_alg,
|
||||||
mbedtls_ssl_sig_alg_to_str( *sig_alg ) ) );
|
mbedtls_ssl_sig_alg_to_str( *sig_alg ) ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Length of supported_signature_algorithms */
|
/* Length of supported_signature_algorithms */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user