From 82fc101164b4f420972bf6e25b529ffd012d89bb Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 29 Jul 2019 19:53:57 -0400 Subject: s_client: Fix socket FD issues wolfSSL's error reporting and debugging messages were of no help in debugging this. --- diff --git a/src/s_client.c b/src/s_client.c index ea9972d..3559728 100644 --- a/src/s_client.c +++ b/src/s_client.c @@ -57,7 +57,7 @@ parse_host_port(char *hostport, char **host, char **port) return true; } -static _Bool +static int connect_socket(const char *host, const char *port) { struct addrinfo hints = {0}; @@ -260,6 +260,7 @@ s_client(int argc, char **argv) ret = EXIT_FAILURE; goto ssl_free; } + wolfSSL_set_fd(ssl, sfd); if (poll_fds(sfd, ssl) == false) { ret = EXIT_FAILURE; -- cgit v0.9.1