Fix the parse_sig_alg_ext fail issue
Change-Id: Ib31e0929c5b6868ab6c3023b20472321fc07ba3c Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
This commit is contained in:
parent
8f9dfe41c0
commit
f8ceb94fe7
2 changed files with 12 additions and 2 deletions
|
@ -115,8 +115,12 @@ int mbedtls_ssl_tls13_parse_sig_alg_ext( mbedtls_ssl_context *ssl,
|
|||
MBEDTLS_SSL_DEBUG_MSG( 4, ( "received signature algorithm: 0x%x",
|
||||
sig_alg ) );
|
||||
|
||||
if( ! mbedtls_ssl_sig_alg_is_offered( ssl, sig_alg ) ||
|
||||
! mbedtls_ssl_sig_alg_is_supported( ssl, sig_alg ) )
|
||||
if( ! mbedtls_ssl_sig_alg_is_supported( ssl, sig_alg )
|
||||
#if defined(MBEDTLS_SSL_CLI_C)
|
||||
|| ( ( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT )
|
||||
&& ! mbedtls_ssl_sig_alg_is_offered( ssl, sig_alg ) )
|
||||
#endif /* MBEDTLS_SSL_CLI_C */
|
||||
)
|
||||
continue;
|
||||
|
||||
if( common_idx + 1 < MBEDTLS_RECEIVED_SIG_ALGS_SIZE )
|
||||
|
|
|
@ -448,6 +448,12 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
|
|||
}
|
||||
p += 2;
|
||||
|
||||
/*
|
||||
* Only support TLS 1.3 currently, temporarily set the version.
|
||||
*/
|
||||
ssl->major_ver = MBEDTLS_SSL_MAJOR_VERSION_3;
|
||||
ssl->minor_ver = MBEDTLS_SSL_MINOR_VERSION_4;
|
||||
|
||||
/*
|
||||
* Save client random
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue