From b1c5f3b299020d1783cf688a03a83e3cb08d99e6 Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 2 Oct 2015 16:25:17 -0700 Subject: [PATCH] add show every cipher suite to examples/client --- examples/client/client.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/client/client.c b/examples/client/client.c index e4f815102..b37fd4cd3 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -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) { printf("client " LIBWOLFSSL_VERSION_STRING @@ -139,6 +150,7 @@ static void Usage(void) printf("-t Track wolfSSL memory use\n"); printf("-d Disable peer checks\n"); printf("-D Override Date Errors example\n"); + printf("-e List Every cipher suite available, \n"); printf("-g Send server HTTP GET\n"); printf("-u Use UDP DTLS," " 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(); 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) { switch (ch) { case '?' : @@ -296,6 +308,10 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) doPeerCheck = 0; break; + case 'e' : + ShowCiphers(); + exit(EXIT_SUCCESS); + case 'D' : overrideDateErrors = 1; break;