Query config through ssl_server2 and ssl_client2 cmdline
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index f654e66..2a499ad 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -415,6 +415,10 @@
" in order from ssl3 to tls1_2\n" \
" default: all enabled\n" \
" force_ciphersuite=<name> default: all enabled\n" \
+ " query_config=<name> return 0 if the specified\n" \
+ " configuration macro is defined and 1\n" \
+ " otherwise. The expansion of the macro\n" \
+ " is printed if it is defined\n" \
" acceptable ciphersuite names:\n"
@@ -508,6 +512,8 @@
int badmac_limit; /* Limit of records with bad MAC */
} opt;
+int query_config( const char *config );
+
static void my_debug( void *ctx, int level,
const char *file, int line,
const char *str )
@@ -1756,6 +1762,10 @@
{
opt.sni = q;
}
+ else if( strcmp( p, "query_config" ) == 0 )
+ {
+ return query_config( q );
+ }
else
goto usage;
}