8000 fix(ssl): Add size arg to NetworkClientSecure::setCACertBundle (#10101) · felmue/arduino-esp32@23b84e5 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23b84e5

Browse files
authored
fix(ssl): Add size arg to NetworkClientSecure::setCACertBundle (espressif#10101)
1 parent 2aa4828 commit 23b84e5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libraries/NetworkClientSecure/src/NetworkClientSecure.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ void NetworkClientSecure::setCACert(const char *rootCA) {
339339
_use_insecure = false;
340340
}
341341

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);
345345
attach_ssl_certificate_bundle(sslclient.get(), true);
346346
_use_ca_bundle = true;
347347
} else {

libraries/NetworkClientSecure/src/NetworkClientSecure.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class NetworkClientSecure : public NetworkClient {
7373
void setCertificate(const char *client_ca);
7474
void setPrivateKey(const char *private_key);
7575
bool loadCACert(Stream &stream, size_t size);
76-
void setCACertBundle(const uint8_t *bundle);
76+
void setCACertBundle(const uint8_t *bundle, size_t size);
7777
bool loadCertificate(Stream &stream, size_t size);
7878
bool loadPrivateKey(Stream &stream, size_t size);
7979
bool verify(const char *fingerprint, const char *domain_name);

0 commit comments

Comments
 (0)
0