From 91f8327e40a0ad751503f5948d832c3f9d2ece03 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 24 Jul 2019 13:59:07 +0100 Subject: [PATCH] cli/srv ex: Add dbg msg if record checking gives inconsistent result --- programs/ssl/ssl_client2.c | 4 ++-- programs/ssl/ssl_server2.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 51a59fef3..c37f4b0cf 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -681,8 +681,8 @@ static int ssl_check_record( mbedtls_ssl_context const *ssl, ret_repeated = mbedtls_ssl_check_record( ssl, tmp_buf, len ); if( ret != ret_repeated ) { - ret = -1; - goto exit; + mbedtls_printf( "mbedtls_ssl_check_record() returned inconsistent results.\n" ); + return( -1 ); } switch( ret ) diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index be448a01b..a796f5712 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -793,8 +793,8 @@ static int ssl_check_record( mbedtls_ssl_context const *ssl, ret_repeated = mbedtls_ssl_check_record( ssl, tmp_buf, len ); if( ret != ret_repeated ) { - ret = -1; - goto exit; + mbedtls_printf( "mbedtls_ssl_check_record() returned inconsistent results.\n" ); + return( -1 ); } switch( ret )