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 )