diff --git a/library/ssl_srv.c b/library/ssl_srv.c index bc94ebb98..84c8e1e11 100644 --- a/library/ssl_srv.c +++ b/library/ssl_srv.c @@ -3135,8 +3135,7 @@ curve_matching_done: mbedtls_md_init( &ctx ); - /* Info from md_alg will be used instead */ - hashlen = 0; + hashlen = mbedtls_md_get_size( md_info ); /* * digitally-signed struct { @@ -3165,8 +3164,7 @@ curve_matching_done: return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); } - MBEDTLS_SSL_DEBUG_BUF( 3, "parameters hash", hash, hashlen != 0 ? hashlen : - (unsigned int) ( mbedtls_md_get_size( mbedtls_md_info_from_type( md_alg ) ) ) ); + MBEDTLS_SSL_DEBUG_BUF( 3, "parameters hash", hash, hashlen ); /* * 3.3: Compute and add the signature