diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-08-07 21:56:56 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-08-07 21:56:56 (EDT) |
commit | f8ec39647be17228ed9333bb2a97444a92ef4e90 (patch) | |
tree | 2d6dd46e2230984b8b0ed7f91c977f3081b10c86 /src | |
parent | 443c9257edad2585aefe1e960b0c629a4f26cc35 (diff) |
s_client: Enable wolfSSL debug msgs if not quiet
Diffstat (limited to 'src')
-rw-r--r-- | src/s_client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/s_client.c b/src/s_client.c index 4ada587..8da7401 100644 --- a/src/s_client.c +++ b/src/s_client.c @@ -184,6 +184,7 @@ poll_fds(int sfd, WOLFSSL *ssl) int s_client(int argc, char **argv) { + _Bool quiet = false; char *host = NULL; char *port = NULL; const char *servername = NULL; @@ -197,7 +198,7 @@ s_client(int argc, char **argv) for (; argc > 0; --argc, ++argv) { if (strcmp(*argv, "-quiet") == 0) { - /* No-op */ + quiet = true; } else if (strcmp(*argv, "-connect") == 0) { --argc, ++argv; if (parse_host_port(*argv, &host, &port) == false) { @@ -213,6 +214,10 @@ s_client(int argc, char **argv) wolfSSL_Init(); + if (quiet == false) { + wolfSSL_Debugging_ON(); + } + if ( (method = wolfTLSv1_2_client_method()) == NULL || (ctx = wolfSSL_CTX_new(method)) == NULL || |