From ecea07d6c30a8c7819637e4297b292542e10598a Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 7 Nov 2018 16:24:35 +0000 Subject: [PATCH] Unify ciphersuite related debug output on client and server The client previously reproted the offered ciphersuites through their numerical identifier only, while the server reported them through their name. This commit modifies the debug output on client and server to both use the format `ID (NAME)` for the ciphersuites. --- library/ssl_cli.c | 4 ++-- library/ssl_srv.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/library/ssl_cli.c b/library/ssl_cli.c index 361e6e6d2..395303e33 100644 --- a/library/ssl_cli.c +++ b/library/ssl_cli.c @@ -1063,8 +1063,8 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) ssl->conf->max_minor_ver ) != 0 ) continue; - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x", - ciphersuites[i] ) ); + MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, add ciphersuite: %04x (%s)", + ciphersuites[i], ciphersuite_info->name ) ); #if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) diff --git a/library/ssl_srv.c b/library/ssl_srv.c index 91bd83aa2..bc25b39b8 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -929,7 +929,8 @@ static int ssl_ciphersuite_match( mbedtls_ssl_context *ssl, int suite_id, return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); } - MBEDTLS_SSL_DEBUG_MSG( 3, ( "trying ciphersuite: %s", suite_info->name ) ); + MBEDTLS_SSL_DEBUG_MSG( 3, ( "trying ciphersuite: %04x (%s)", + suite_id, suite_info->name ) ); if( suite_info->min_minor_ver > ssl->minor_ver || suite_info->max_minor_ver < ssl->minor_ver )