1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Query config through ssl_server2 and ssl_client2 cmdline

This commit is contained in:
Andres Amaya Garcia
2018-10-16 21:08:38 +01:00
parent f352f75f6b
commit bc81884e3a
4 changed files with 2490 additions and 4 deletions

View File

@ -415,6 +415,10 @@ int main( void )
" 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 @@ struct options
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 @@ int main( int argc, char *argv[] )
{
opt.sni = q;
}
else if( strcmp( p, "query_config" ) == 0 )
{
return query_config( q );
}
else
goto usage;
}