Support Arduino >=3.x for custom network client (#954)

Support Arduino >=3.x for custom network client
This commit is contained in:
Moritz Ulmer
2025-10-02 17:18:44 +02:00
committed by GitHub
parent 6eee4c6dc6
commit 3af6593a00
5 changed files with 18 additions and 5 deletions

View File

@@ -158,11 +158,20 @@ void WebSocketsNetworkClientSecure::setCACert(const char *rootCA) {
Serial.println(_impl->no_interface_error_);
}
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 4)
void WebSocketsNetworkClientSecure::setCACertBundle(const uint8_t *bundle,
size_t bundle_size) {
#else
void WebSocketsNetworkClientSecure::setCACertBundle(const uint8_t *bundle) {
#endif
if (_impl->gsm_client_secure_) {
return _impl->gsm_client_secure_->setCACertBundle(bundle);
} else if (_impl->wifi_client_secure_) {
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 4)
return _impl->wifi_client_secure_->setCACertBundle(bundle, bundle_size);
#else
return _impl->wifi_client_secure_->setCACertBundle(bundle);
#endif
}
Serial.println(_impl->no_interface_error_);
}