Skip to content

Commit

Permalink
Fix non-ESP32 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz89 committed Jun 15, 2024
1 parent 40f925f commit 66a15c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/WebSocketsClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ void WebSocketsClient::begin(const char * host, uint16_t port, const char * url,
#if defined(HAS_SSL)
_fingerprint = SSL_FINGERPRINT_NULL;
_CA_cert = NULL;
#ifdef ESP32
_CA_bundle = NULL;
#endif
#endif

_client.num = 0;
Expand Down Expand Up @@ -242,12 +244,10 @@ void WebSocketsClient::loop(void) {
#else
#error setCACert not implemented
#endif
#if defined(ESP32)
} else if(_CA_bundle) {
DEBUG_WEBSOCKETS("[WS-Client] setting CA bundle");
#if defined(ESP32)
_client.ssl->setCACertBundle(_CA_bundle);
#else
#error setCABundle not implemented
#endif
#if defined(ESP32)
} else if(!SSL_FINGERPRINT_IS_SET) {
Expand Down
2 changes: 2 additions & 0 deletions src/WebSocketsClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class WebSocketsClient : protected WebSockets {
void setSSLClientCertKey(const char * clientCert = NULL, const char * clientPrivateKey = NULL);
#endif
void beginSslWithCA(const char * host, uint16_t port, const char * url = "/", const char * CA_cert = NULL, const char * protocol = "arduino");
#ifdef ESP32
void beginSslWithBundle(const char * host, uint16_t port, const char * url = "/", const uint8_t * CA_bundle = NULL, const char * protocol = "arduino");
#endif
#endif

void beginSocketIO(const char * host, uint16_t port, const char * url = "/socket.io/?EIO=3", const char * protocol = "arduino");
Expand Down

0 comments on commit 66a15c7

Please sign in to comment.