forked from espressif/arduino-esp32
handshake in ssl_client.cpp (#2044)
* issue #2041 * handshake timeout * seconds to milliseconds
This commit is contained in:
committed by
Me No Dev
parent
0640964879
commit
46257c03b3
@ -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;
|
||||
}
|
Reference in New Issue
Block a user