mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Query config through ssl_server2 and ssl_client2 cmdline
This commit is contained in:
@@ -312,6 +312,10 @@ int main( void )
|
||||
" options: ssl3, tls1, tls1_1, tls1_2, dtls1, dtls1_2\n" \
|
||||
"\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"
|
||||
|
||||
#define ALPN_LIST_SIZE 10
|
||||
@@ -383,6 +387,8 @@ struct options
|
||||
int etm; /* negotiate encrypt then mac? */
|
||||
} opt;
|
||||
|
||||
int query_config( const char *config );
|
||||
|
||||
static void my_debug( void *ctx, int level,
|
||||
const char *file, int line,
|
||||
const char *str )
|
||||
@@ -992,6 +998,10 @@ int main( int argc, char *argv[] )
|
||||
if( opt.dhmlen < 0 )
|
||||
goto usage;
|
||||
}
|
||||
else if( strcmp( p, "query_config" ) == 0 )
|
||||
{
|
||||
return query_config( q );
|
||||
}
|
||||
else
|
||||
goto usage;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user