forked from wolfSSL/wolfssl
add show every cipher suite to examples/client
This commit is contained in:
@@ -117,6 +117,17 @@ static void NonBlockingSSL_Connect(WOLFSSL* ssl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void ShowCiphers(void)
|
||||||
|
{
|
||||||
|
char ciphers[4096];
|
||||||
|
|
||||||
|
int ret = wolfSSL_get_ciphers(ciphers, (int)sizeof(ciphers));
|
||||||
|
|
||||||
|
if (ret == SSL_SUCCESS)
|
||||||
|
printf("%s\n", ciphers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void Usage(void)
|
static void Usage(void)
|
||||||
{
|
{
|
||||||
printf("client " LIBWOLFSSL_VERSION_STRING
|
printf("client " LIBWOLFSSL_VERSION_STRING
|
||||||
@@ -139,6 +150,7 @@ static void Usage(void)
|
|||||||
printf("-t Track wolfSSL memory use\n");
|
printf("-t Track wolfSSL memory use\n");
|
||||||
printf("-d Disable peer checks\n");
|
printf("-d Disable peer checks\n");
|
||||||
printf("-D Override Date Errors example\n");
|
printf("-D Override Date Errors example\n");
|
||||||
|
printf("-e List Every cipher suite available, \n");
|
||||||
printf("-g Send server HTTP GET\n");
|
printf("-g Send server HTTP GET\n");
|
||||||
printf("-u Use UDP DTLS,"
|
printf("-u Use UDP DTLS,"
|
||||||
" add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n");
|
" add -v 2 for DTLSv1 (default), -v 3 for DTLSv1.2\n");
|
||||||
@@ -281,7 +293,7 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
StackTrap();
|
StackTrap();
|
||||||
|
|
||||||
while ((ch = mygetopt(argc, argv,
|
while ((ch = mygetopt(argc, argv,
|
||||||
"?gdDusmNrwRitfxXUPCh:p:v:l:A:c:k:Z:b:zS:L:ToO:a"))
|
"?gdeDusmNrwRitfxXUPCh:p:v:l:A:c:k:Z:b:zS:L:ToO:a"))
|
||||||
!= -1) {
|
!= -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case '?' :
|
case '?' :
|
||||||
@@ -296,6 +308,10 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
doPeerCheck = 0;
|
doPeerCheck = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'e' :
|
||||||
|
ShowCiphers();
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
case 'D' :
|
case 'D' :
|
||||||
overrideDateErrors = 1;
|
overrideDateErrors = 1;
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user