From 55fab2de5d1c0d25eaa19380951c83d32aa3e1a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 11 May 2015 16:15:19 +0200 Subject: [PATCH] Fix a few more #ifdef's --- library/ssl_tls.c | 2 +- programs/ssl/mini_client.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 0a8119e25..6918e4b07 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -6578,7 +6578,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) } #endif -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) +#if defined(MBEDTLS_X509_CRT_PARSE_C) if( ssl->hostname != NULL ) { mbedtls_zeroize( ssl->hostname, strlen( ssl->hostname ) ); diff --git a/programs/ssl/mini_client.c b/programs/ssl/mini_client.c index 20ce2b7fe..090e018bf 100644 --- a/programs/ssl/mini_client.c +++ b/programs/ssl/mini_client.c @@ -221,11 +221,13 @@ int main( void ) goto exit; } +#if defined(MBEDTLS_X509_CRT_PARSE_C) if( mbedtls_ssl_set_hostname( &ssl, HOSTNAME ) != 0 ) { ret = hostname_failed; goto exit; } +#endif /* * 1. Start the connection