check return value of wolfSSL_set_fd

This commit is contained in:
Jacob Barthelmeh
2016-03-25 13:59:04 -06:00
parent 57ea1cdcd7
commit 696169634e
6 changed files with 34 additions and 12 deletions

View File

@@ -169,7 +169,8 @@ int wolfSSL_swig_connect(WOLFSSL* ssl, const char* server, int port)
int ret = tcp_connect(&sockfd, server, port);
if (ret != 0) return ret;
wolfSSL_set_fd(ssl, sockfd);
ret = wolfSSL_set_fd(ssl, sockfd);
if (ret != SSL_SUCCESS) return ret;
return wolfSSL_connect(ssl);
}