mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-15 00:06:30 +02:00
disconnect on certificate mismatch
This commit is contained in:
@ -140,6 +140,7 @@ void WebSocketsClient::loop(void) {
|
|||||||
if (_client.isSSL && _client.fingerprint != NULL) {
|
if (_client.isSSL && _client.fingerprint != NULL) {
|
||||||
if (!(((WiFiClientSecure*)_client.tcp)->verify(_client.fingerprint, _host.c_str()))) {
|
if (!(((WiFiClientSecure*)_client.tcp)->verify(_client.fingerprint, _host.c_str()))) {
|
||||||
DEBUG_WEBSOCKETS("[WS-Client] certificate mismatch\n");
|
DEBUG_WEBSOCKETS("[WS-Client] certificate mismatch\n");
|
||||||
|
WebSockets::clientDisconnect(&_client, 1000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user