diff --git a/src/tiny_websockets/network/esp32/esp32_tcp.hpp b/src/tiny_websockets/network/esp32/esp32_tcp.hpp index b10820c..e8bd5fa 100644 --- a/src/tiny_websockets/network/esp32/esp32_tcp.hpp +++ b/src/tiny_websockets/network/esp32/esp32_tcp.hpp @@ -16,6 +16,10 @@ namespace websockets { namespace network { class SecuredEsp32TcpClient : public GenericEspTcpClient { public: + void setInsecure() { + this->client.setInsecure(); + } + void setCACert(const char* ca_cert) { this->client.setCACert(ca_cert); } diff --git a/src/websockets_client.cpp b/src/websockets_client.cpp index f72a14a..b22faa6 100644 --- a/src/websockets_client.cpp +++ b/src/websockets_client.cpp @@ -230,6 +230,8 @@ namespace websockets { } if(this->_optional_ssl_private_key) { client->setPrivateKey(this->_optional_ssl_private_key); + } else { + client->setInsecure(); } #endif