mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-21 21:36:21 +01:00
Query config through ssl_server2 and ssl_client2 cmdline
This commit is contained in:
parent
6f76795bf5
commit
bfa3e0914b
4 changed files with 2490 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue