Skip to content

Commit 685aa22

Browse files
author
Mikhail Gorbunov
committed
ESP board library >= 3.0.0 build fix
1 parent fa2952f commit 685aa22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utility/WebSocketsClient.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,12 @@ void WebSocketsClient::connectedCb() {
703703
_client.tcp->setNoDelay(true);
704704

705705
if(_client.isSSL && _fingerprint.length()) {
706-
if(!_client.ssl->verify(_fingerprint.c_str(), _host.c_str())) {
706+
#if ESP_IDF_VERSION_MAJOR >= 3
707+
if(!_client.ssl->verify(_fingerprint.c_str(), _host.c_str()))
708+
#else
709+
if(!_client.ssl->setFingerprint(_fingerprint.c_str()))
710+
#endif
711+
{
707712
DEBUG_WEBSOCKETS("[WS-Client] certificate mismatch\n");
708713
WebSockets::clientDisconnect(&_client, 1000);
709714
return;

0 commit comments

Comments
 (0)