From 98f85c8c25076408bf690fedb68d40e771207659 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 11 Jun 2019 17:16:13 +0100 Subject: [PATCH] Add missing dependencies on !MBEDTLS_X509_REMOVE_INFO --- programs/ssl/ssl_client2.c | 2 ++ tests/suites/test_suite_x509parse.function | 2 ++ 2 files changed, 4 insertions(+) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index a6493a16c..5b7443503 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -2001,6 +2001,7 @@ int main( int argc, char *argv[] ) else mbedtls_printf( " ok\n" ); +#if !defined(MBEDTLS_X509_REMOVE_INFO) if( mbedtls_ssl_get_peer_cert( &ssl ) != NULL ) { mbedtls_printf( " . Peer certificate information ...\n" ); @@ -2008,6 +2009,7 @@ int main( int argc, char *argv[] ) mbedtls_ssl_get_peer_cert( &ssl ) ); mbedtls_printf( "%s\n", buf ); } +#endif /* !MBEDTLS_X509_REMOVE_INFO */ #endif /* MBEDTLS_X509_CRT_PARSE_C */ #if defined(MBEDTLS_SSL_DTLS_CONNECTION_ID) diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 2d50b3366..c9fe63f09 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -529,6 +529,8 @@ void x509parse_crt( data_t * buf, char * result_str, int result ) TEST_ASSERT( strcmp( (char *) output, result_str ) == 0 ); } +#else + ((void) result_str); #endif mbedtls_x509_crt_free( &crt );