From e85414edd03e69d606cc0eb93ee46f6a50723da9 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Tue, 15 Jan 2019 05:23:59 -0500 Subject: [PATCH] ssl-opt: add a check for PSA computation of digest of ServerKeyExchange --- library/ssl_tls.c | 8 ++++---- tests/ssl-opt.sh | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 675150d56..3d87bfc9e 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -9988,8 +9988,8 @@ int mbedtls_ssl_get_key_exchange_md_tls1_2( mbedtls_ssl_context *ssl, psa_hash_operation_t hash_operation; psa_algorithm_t hash_alg = mbedtls_psa_translate_md( md_alg ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "Perform PSA-based computation of digest \ - of ServerKeyExchange" ) ); + MBEDTLS_SSL_DEBUG_MSG( 1, ( "Perform PSA-based computation of digest " + "of ServerKeyExchange" ) ); if( ( status = psa_hash_setup( &hash_operation, hash_alg ) ) != PSA_SUCCESS ) @@ -10052,8 +10052,8 @@ int mbedtls_ssl_get_key_exchange_md_tls1_2( mbedtls_ssl_context *ssl, const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); *hashlen = mbedtls_md_get_size( md_info ); - MBEDTLS_SSL_DEBUG_MSG( 2, ( "Perform mbedtls-based computation of digest \ - of ServerKeyExchange" ) ); + MBEDTLS_SSL_DEBUG_MSG( 1, ( "Perform mbedtls-based computation of digest " + "of ServerKeyExchange" ) ); mbedtls_md_init( &ctx ); diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 2ccecc4b1..30753b779 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -765,6 +765,7 @@ run_test_psa() { -C "Failed to setup PSA-based cipher context"\ -S "Failed to setup PSA-based cipher context"\ -s "Protocol is TLSv1.2" \ + -c "Perform PSA-based computation of digest of ServerKeyExchange" \ -S "error" \ -C "error" }