Skip to content

Commit b1f7940

Browse files
committed
Pico W: Correctly treat empty cadata= as disabling host checking
1 parent ca9523b commit b1f7940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/raspberrypi/common-hal/ssl/SSLContext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self,
4242
self->crt_bundle_attach = NULL;
4343
self->use_global_ca_store = false;
4444
self->cacert_buf = (const unsigned char *)cadata;
45-
self->cacert_bytes = strlen(cadata) + 1;
45+
self->cacert_bytes = *cadata ? strlen(cadata) + 1 : 0;
4646
}
4747

4848
void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self) {

0 commit comments

Comments
 (0)