diff --git a/src/tls/utility/TLSClientMqtt.cpp b/src/tls/utility/TLSClientMqtt.cpp index 374618163..831f31cf5 100644 --- a/src/tls/utility/TLSClientMqtt.cpp +++ b/src/tls/utility/TLSClientMqtt.cpp @@ -60,7 +60,11 @@ void TLSClientMqtt::begin(ConnectionHandler & connection) { */ (void)connection; #elif defined(ARDUINO_ARCH_ESP32) - setCACertBundle(x509_crt_bundle); + #if (ESP_ARDUINO_VERSION < ESP_ARDUINO_VERSION_VAL(3, 0, 4)) + setCACertBundle(x509_crt_bundle); + #else + setCACertBundle(x509_crt_bundle, sizeof(x509_crt_bundle)); + #endif #elif defined(ARDUINO_ARCH_ESP8266) setInsecure(); #endif diff --git a/src/tls/utility/TLSClientOta.cpp b/src/tls/utility/TLSClientOta.cpp index 77096b6f2..f03af7696 100644 --- a/src/tls/utility/TLSClientOta.cpp +++ b/src/tls/utility/TLSClientOta.cpp @@ -56,7 +56,11 @@ void TLSClientOta::begin(ConnectionHandler &connection) { */ (void)connection; #elif defined(ARDUINO_ARCH_ESP32) - setCACertBundle(x509_crt_bundle); + #if (ESP_ARDUINO_VERSION < ESP_ARDUINO_VERSION_VAL(3, 0, 4)) + setCACertBundle(x509_crt_bundle); + #else + setCACertBundle(x509_crt_bundle, sizeof(x509_crt_bundle)); + #endif #elif defined(ARDUINO_ARCH_ESP8266) setInsecure(); #endif