Pico W: Correctly treat empty cadata= as disabling host checking

This commit is contained in:
Jeff Epler 2022-10-12 11:35:10 -05:00
parent ca9523b814
commit b1f7940297
No known key found for this signature in database
GPG Key ID: D5BF15AB975AB4DE

View File

@ -42,7 +42,7 @@ void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self,
self->crt_bundle_attach = NULL;
self->use_global_ca_store = false;
self->cacert_buf = (const unsigned char *)cadata;
self->cacert_bytes = strlen(cadata) + 1;
self->cacert_bytes = *cadata ? strlen(cadata) + 1 : 0;
}
void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self) {