add a handshake timeout, stop() should free the new clientCr and clientKey

This commit is contained in:
brentru
2019-10-01 13:56:47 -04:00
parent ffbca9c1e3
commit f3cbd721cb
2 changed files with 10 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ public:
virtual operator bool();
virtual void setCertificate(const char *client_ca);
virtual void setPrivateKey (const char *private_key);
virtual void setHandshakeTimeout(unsigned long handshake_timeout);
// using Print::write;
@@ -73,6 +74,7 @@ private:
mbedtls_pk_context _clientKey;
bool _connected;
int _peek;
unsigned long handshake_timeout;
SemaphoreHandle_t _mbedMutex;
};