Skip to content

Commit ee30d99

Browse files
committed
fix setCACertBundle() signature
dieser Bug ist beim Firmwareupdate jedenfalls noch präsent, unklar ob das schon alles war: Symptom: E (640) esp-x509-crt-bundle: Invalid certificate bundle ... [434608][E][ssl_client.cpp:213] start_ssl_client(): useRootCABundle is set, but attach_ssl_certificate_bundle(ssl, true); was not called! [434620][V][ssl_client.cpp:288] start_ssl_client(): Setting hostname for TLS session... [434628][V][ssl_client.cpp:309] ssl_starttls_handshake(): Performing the SSL/TLS handshake... [434670][E][ssl_client.cpp:36] _handle_error(): [ssl_starttls_handshake():313]: (-30336) SSL - No CA Chain is set, but required to operate [434683][E][NetworkClientSecure.cpp:159] connect(): start_ssl_client: connect failed: -30336 [434691][V][ssl_client.cpp:360] stop_ssl_socket(): Cleaning SSL connection. [434699][D][HTTPClient.cpp:1105] connect(): failed connect to objects.githubusercontent.com:443 bug report espressif/arduino-esp32#10099 fix in Arduino master espressif/arduino-esp32@f350d16 mir ist leider unklar warum, der sollte in Arduino 3.0.4 fefixt sein :-/
1 parent a607be5 commit ee30d99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/PsychicMqttClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ PsychicMqttClient &PsychicMqttClient::setCACert(const char *rootCA, size_t rootC
6565
return *this;
6666
}
6767

68-
PsychicMqttClient &PsychicMqttClient::setCACertBundle(const uint8_t *bundle)
68+
PsychicMqttClient &PsychicMqttClient::setCACertBundle(const uint8_t *bundle, size_t bundleLen)
6969
{
7070
if (bundle != nullptr)
7171
{
72-
esp_crt_bundle_set(bundle, strlen((const char*)bundle));
72+
esp_crt_bundle_set(bundle, bundleLen);
7373
_mqtt_cfg.broker.verification.crt_bundle_attach = esp_crt_bundle_attach;
7474
}
7575
else

src/PsychicMqttClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class PsychicMqttClient
147147
* @param bundle The certificate bundle in PEM or DER format.
148148
* @return A reference to the PsychicMqttClient instance.
149149
*/
150-
PsychicMqttClient &setCACertBundle(const uint8_t *bundle);
150+
PsychicMqttClient &setCACertBundle(const uint8_t *bundle, size_t bundleLen = 0);
151151

152152
/**
153153
* @brief Attaches an existing CA root certificate bundle for the MQTT server. Like if you

0 commit comments

Comments
 (0)