From 34babfc5b29bd6a1476109c4557ab21548c27767 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 16 Feb 2021 15:44:37 +0100 Subject: [PATCH] Add comments to a few #endif closing a long chunk Signed-off-by: Gilles Peskine --- programs/ssl/ssl_client2.c | 11 ++++++----- programs/ssl/ssl_server2.c | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 706541284..8f2b2c159 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -703,7 +703,7 @@ int main( int argc, char *argv[] ) #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_key_id_t key_slot = 0; /* invalid key slot */ #endif -#endif +#endif /* MBEDTLS_X509_CRT_PARSE_C */ char *p, *q; const int *list; #if defined(MBEDTLS_SSL_CONTEXT_SERIALIZATION) @@ -1882,7 +1882,7 @@ int main( int argc, char *argv[] ) #else fprintf( stderr, "Warning: reproducible option used without constant time\n" ); #endif -#endif +#endif /* MBEDTLS_HAVE_TIME */ } mbedtls_ssl_conf_rng( &conf, rng_get, &rng ); mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); @@ -1928,7 +1928,7 @@ int main( int argc, char *argv[] ) goto exit; } } -#endif +#endif /* MBEDTLS_X509_CRT_PARSE_C */ #if defined(MBEDTLS_ECP_C) if( opt.curves != NULL && @@ -3000,7 +3000,8 @@ exit: #if defined(MBEDTLS_USE_PSA_CRYPTO) psa_destroy_key( key_slot ); #endif -#endif +#endif /* MBEDTLS_X509_CRT_PARSE_C */ + mbedtls_ssl_session_free( &saved_session ); mbedtls_ssl_free( &ssl ); mbedtls_ssl_config_free( &conf ); @@ -3040,7 +3041,7 @@ exit: mbedtls_memory_buffer_alloc_status(); #endif mbedtls_memory_buffer_alloc_free(); -#endif +#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ #if defined(_WIN32) if( opt.query_config_mode == DFL_QUERY_CONFIG_MODE ) diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 5d86e3bf8..0bbf018b0 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -2684,7 +2684,7 @@ int main( int argc, char *argv[] ) #else fprintf( stderr, "Warning: reproducible option used without constant time\n" ); #endif -#endif +#endif /* MBEDTLS_HAVE_TIME */ } mbedtls_ssl_conf_rng( &conf, rng_get, &rng ); mbedtls_ssl_conf_dbg( &conf, my_debug, stdout ); @@ -4003,7 +4003,7 @@ exit: mbedtls_memory_buffer_alloc_status(); #endif mbedtls_memory_buffer_alloc_free(); -#endif +#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ if( opt.query_config_mode == DFL_QUERY_CONFIG_MODE ) {