Skip to content

Commit bdf75eb

Browse files
author
Hanno Becker
committed
Add missing compile time guard in ssl_client2
1 parent 775655e commit bdf75eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

programs/ssl/ssl_client2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,7 +2147,9 @@ int main( int argc, char *argv[] )
21472147
mbedtls_printf( " . Restarting connection from same port..." );
21482148
fflush( stdout );
21492149

2150+
#if defined(MBEDTLS_X509_CRT_PARSE_C)
21502151
memset( peer_crt_info, 0, sizeof( peer_crt_info ) );
2152+
#endif /* MBEDTLS_X509_CRT_PARSE_C */
21512153

21522154
if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 )
21532155
{
@@ -2220,7 +2222,9 @@ int main( int argc, char *argv[] )
22202222

22212223
mbedtls_printf( " . Reconnecting with saved session..." );
22222224

2225+
#if defined(MBEDTLS_X509_CRT_PARSE_C)
22232226
memset( peer_crt_info, 0, sizeof( peer_crt_info ) );
2227+
#endif /* MBEDTLS_X509_CRT_PARSE_C */
22242228

22252229
if( ( ret = mbedtls_ssl_session_reset( &ssl ) ) != 0 )
22262230
{

0 commit comments

Comments
 (0)