From bdf75eb2434fa6713fac4a00ed61242ab7d351fd Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 27 Feb 2019 08:34:31 +0000 Subject: [PATCH] Add missing compile time guard in ssl_client2 --- programs/ssl/ssl_client2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index f370bf0fc..f7e24598d 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -2147,7 +2147,9 @@ send_request: mbedtls_printf( " . Restarting connection from same port..." ); fflush( stdout ); +#if defined(MBEDTLS_X509_CRT_PARSE_C) memset( peer_crt_info, 0, sizeof( peer_crt_info ) ); +#endif /* MBEDTLS_X509_CRT_PARSE_C */ if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 ) { @@ -2220,7 +2222,9 @@ reconnect: mbedtls_printf( " . Reconnecting with saved session..." ); +#if defined(MBEDTLS_X509_CRT_PARSE_C) memset( peer_crt_info, 0, sizeof( peer_crt_info ) ); +#endif /* MBEDTLS_X509_CRT_PARSE_C */ if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 ) {