File tree 2 files changed +4
-4
lines changed
libraries/NetworkClientSecure/src
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -339,9 +339,9 @@ void NetworkClientSecure::setCACert(const char *rootCA) {
339
339
_use_insecure = false ;
340
340
}
341
341
342
- void NetworkClientSecure::setCACertBundle (const uint8_t *bundle) {
343
- if (bundle != NULL ) {
344
- esp_crt_bundle_set (bundle, sizeof (bundle) );
342
+ void NetworkClientSecure::setCACertBundle (const uint8_t *bundle, size_t size ) {
343
+ if (bundle != NULL && size > 0 ) {
344
+ esp_crt_bundle_set (bundle, size );
345
345
attach_ssl_certificate_bundle (sslclient.get (), true );
346
346
_use_ca_bundle = true ;
347
347
} else {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class NetworkClientSecure : public NetworkClient {
73
73
void setCertificate (const char *client_ca);
74
74
void setPrivateKey (const char *private_key);
75
75
bool loadCACert (Stream &stream, size_t size);
76
- void setCACertBundle (const uint8_t *bundle);
76
+ void setCACertBundle (const uint8_t *bundle, size_t size );
77
77
bool loadCertificate (Stream &stream, size_t size);
78
78
bool loadPrivateKey (Stream &stream, size_t size);
79
79
bool verify (const char *fingerprint, const char *domain_name);
You can’t perform that action at this time.
0 commit comments