handshake in ssl_client.cpp (#2044)

* issue #2041

* handshake timeout

* seconds to milliseconds
This commit is contained in:
A C SREEDHAR REDDY
2018-11-27 03:55:08 +05:30
committed by Me No Dev
parent 0640964879
commit 46257c03b3
4 changed files with 14 additions and 3 deletions

View File

@ -35,7 +35,7 @@ WiFiClientSecure::WiFiClientSecure()
sslclient = new sslclient_context;
ssl_init(sslclient);
sslclient->socket = -1;
sslclient->handshake_timeout = 120000;
_CA_cert = NULL;
_cert = NULL;
_private_key = NULL;
@ -50,6 +50,7 @@ WiFiClientSecure::WiFiClientSecure(int sock)
sslclient = new sslclient_context;
ssl_init(sslclient);
sslclient->socket = sock;
sslclient->handshake_timeout = 120000;
if (sock >= 0) {
_connected = true;
@ -285,3 +286,8 @@ int WiFiClientSecure::lastError(char *buf, const size_t size)
snprintf(buf, size, "%s", error_buf);
return _lastError;
}
void WiFiClientSecure::setHandshakeTimeout(unsigned long handshake_timeout)
{
sslclient->handshake_timeout = handshake_timeout * 1000;
}