Skip to content

Commit c9908f0

Browse files
committed
Merge remote-tracking branch 'upstream-public/pr/1064' into mbedtls-2.7-restricted-proposed
2 parents e0b1a73 + 4a2fb4c commit c9908f0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Bugfix
3131
overflow. #1179
3232
* Fix memory allocation corner cases in memory_buffer_alloc.c module. Found
3333
by Guido Vranken. #639
34+
* Log correct number of ciphersuites used in Client Hello message. #918
3435
* Fix X509 CRT parsing that would potentially accept an invalid tag when
3536
parsing the subject alternative names.
3637
* Fix a possible arithmetic overflow in ssl_parse_server_key_exchange()

library/ssl_cli.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,13 +902,16 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
902902
*p++ = (unsigned char)( ciphersuites[i] );
903903
}
904904

905+
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, got %d ciphersuites (excluding SCSVs)", n ) );
906+
905907
/*
906908
* Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV
907909
*/
908910
#if defined(MBEDTLS_SSL_RENEGOTIATION)
909911
if( ssl->renego_status == MBEDTLS_SSL_INITIAL_HANDSHAKE )
910912
#endif
911913
{
914+
MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding EMPTY_RENEGOTIATION_INFO_SCSV" ) );
912915
*p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO >> 8 );
913916
*p++ = (unsigned char)( MBEDTLS_SSL_EMPTY_RENEGOTIATION_INFO );
914917
n++;
@@ -928,8 +931,6 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
928931
*q++ = (unsigned char)( n >> 7 );
929932
*q++ = (unsigned char)( n << 1 );
930933

931-
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, got %d ciphersuites", n ) );
932-
933934
#if defined(MBEDTLS_ZLIB_SUPPORT)
934935
offer_compress = 1;
935936
#else

0 commit comments

Comments
 (0)