mirror of
https://github.com/Links2004/arduinoWebSockets.git
synced 2025-07-16 16:52:05 +02:00
Add check to set fingerprint;
This commit is contained in:
@ -170,7 +170,6 @@ void WebSocketsClient::loop(void) {
|
|||||||
_client.tcp = NULL;
|
_client.tcp = NULL;
|
||||||
}
|
}
|
||||||
_client.ssl = new WEBSOCKETS_NETWORK_SSL_CLASS();
|
_client.ssl = new WEBSOCKETS_NETWORK_SSL_CLASS();
|
||||||
_client.ssl->setFingerprint(_fingerprint.c_str());
|
|
||||||
_client.tcp = _client.ssl;
|
_client.tcp = _client.ssl;
|
||||||
if(_CA_cert) {
|
if(_CA_cert) {
|
||||||
DEBUG_WEBSOCKETS("[WS-Client] setting CA certificate");
|
DEBUG_WEBSOCKETS("[WS-Client] setting CA certificate");
|
||||||
@ -180,6 +179,10 @@ void WebSocketsClient::loop(void) {
|
|||||||
_client.ssl->setCACert((const uint8_t *)_CA_cert, strlen(_CA_cert) + 1);
|
_client.ssl->setCACert((const uint8_t *)_CA_cert, strlen(_CA_cert) + 1);
|
||||||
#else
|
#else
|
||||||
#error setCACert not implemented
|
#error setCACert not implemented
|
||||||
|
#endif
|
||||||
|
} else if(_fingerprint.length()) {
|
||||||
|
#if defined(wificlientbearssl_h) && !defined(USING_AXTLS) && !defined(wificlientsecure_h)
|
||||||
|
_client.ssl->setFingerprint(_fingerprint.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user