Write correct number of ciphersuites in log

Change location of log, to fit the correct number of used ciphersuites
This commit is contained in:
Ron Eldor 2017-08-28 13:55:55 +03:00 committed by Jaeden Amero
parent 5e533f43ee
commit 82712a9c97
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,9 @@
mbed TLS ChangeLog (Sorted per branch, date) mbed TLS ChangeLog (Sorted per branch, date)
= mbed TLS x.x.x branch released xxxx-xx-xx
Bugfix
* Log correct number of ciphersuites used in Client Hello message. Fix for #918.
= mbed TLS 2.1.11 branch released xxxx-xx-xx = mbed TLS 2.1.11 branch released xxxx-xx-xx

View File

@ -811,6 +811,8 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
*p++ = (unsigned char)( ciphersuites[i] ); *p++ = (unsigned char)( ciphersuites[i] );
} }
MBEDTLS_SSL_DEBUG_MSG(3, ("client hello, got %d ciphersuites", n));
/* /*
* Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV * Add TLS_EMPTY_RENEGOTIATION_INFO_SCSV
*/ */
@ -837,8 +839,6 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl )
*q++ = (unsigned char)( n >> 7 ); *q++ = (unsigned char)( n >> 7 );
*q++ = (unsigned char)( n << 1 ); *q++ = (unsigned char)( n << 1 );
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, got %d ciphersuites", n ) );
#if defined(MBEDTLS_ZLIB_SUPPORT) #if defined(MBEDTLS_ZLIB_SUPPORT)
offer_compress = 1; offer_compress = 1;
#else #else