From 23699efe78fbdb45e468b2d1dfdd18299dfd3776 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 26 Feb 2019 12:36:53 +0000 Subject: [PATCH] ssl_client2: Reset peer CRT info string on reconnect --- programs/ssl/ssl_client2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 73b707c6a..f370bf0fc 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -2147,6 +2147,8 @@ send_request: mbedtls_printf( " . Restarting connection from same port..." ); fflush( stdout ); + memset( peer_crt_info, 0, sizeof( peer_crt_info ) ); + if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 ) { mbedtls_printf( " failed\n ! mbedtls_ssl_session_reset returned -0x%x\n\n",