mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-26 21:39:56 +00:00
fix various issues
- wrong cipher suite filter condition - name conversion - format issue Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
8c02bb4b71
commit
dbfb7bd873
@ -164,8 +164,8 @@ static int ssl_tls13_write_client_hello_cipher_suites(
|
|||||||
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( cipher_suite );
|
ciphersuite_info = mbedtls_ssl_ciphersuite_from_id( cipher_suite );
|
||||||
if( ciphersuite_info == NULL )
|
if( ciphersuite_info == NULL )
|
||||||
continue;
|
continue;
|
||||||
if( !( MBEDTLS_SSL_MINOR_VERSION_4 > ciphersuite_info->min_minor_ver &&
|
if( !( MBEDTLS_SSL_MINOR_VERSION_4 >= ciphersuite_info->min_minor_ver &&
|
||||||
MBEDTLS_SSL_MINOR_VERSION_4 < ciphersuite_info->max_minor_ver ) )
|
MBEDTLS_SSL_MINOR_VERSION_4 <= ciphersuite_info->max_minor_ver ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x, %s",
|
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x, %s",
|
||||||
@ -259,7 +259,7 @@ static int ssl_tls13_write_client_hello_body( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
/* Write cipher_suites */
|
/* Write cipher_suites */
|
||||||
ret = ssl_tls13_write_client_hello_cipher_suites( ssl, buf, end, &output_len );
|
ret = ssl_tls13_write_client_hello_cipher_suites( ssl, buf, end, &output_len );
|
||||||
if( ret != 0)
|
if( ret != 0 )
|
||||||
return( ret );
|
return( ret );
|
||||||
buf += output_len;
|
buf += output_len;
|
||||||
|
|
||||||
|
@ -53,10 +53,12 @@ int mbedtls_ssl_tls13_finish_handshake_msg( mbedtls_ssl_context *ssl,
|
|||||||
size_t msg_len )
|
size_t msg_len )
|
||||||
{
|
{
|
||||||
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
|
||||||
|
size_t msg_len_with_header;
|
||||||
((void) buf_len);
|
((void) buf_len);
|
||||||
|
|
||||||
/* Add reserved 4 bytes for handshake header */
|
/* Add reserved 4 bytes for handshake header */
|
||||||
ssl->out_msglen = msg_len + 4;
|
msg_len_with_header = msg_len + 4;
|
||||||
|
ssl->out_msglen = msg_len_with_header;
|
||||||
MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_write_handshake_msg_ext( ssl, 0 ) );
|
MBEDTLS_SSL_PROC_CHK( mbedtls_ssl_write_handshake_msg_ext( ssl, 0 ) );
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user