From: Daniel Stenberg Date: Fri, 13 Oct 2023 07:00:50 +0000 (+0200) Subject: wolfssl: require WOLFSSL_SYS_CA_CERTS for loading system CA X-Git-Tag: curl-8_5_0~256 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4dbc2ad467342233dd1b6669d513566a0ce8c48b;p=thirdparty%2Fcurl.git wolfssl: require WOLFSSL_SYS_CA_CERTS for loading system CA This define is set in wolfssl's options.h file when this function and feature is present. Handles both builds with the feature explicitly disabled and wolfSSL versions before 5.5.2 - which introduced this API call. Closes #12108 --- diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c index b1384a644b..135ba697ed 100644 --- a/lib/vtls/wolfssl.c +++ b/lib/vtls/wolfssl.c @@ -513,7 +513,7 @@ wolfssl_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data) } } -#ifndef NO_FILESYSTEM +#if !defined(NO_FILESYSTEM) && defined(WOLFSSL_SYS_CA_CERTS) /* load native CA certificates */ if(ssl_config->native_ca_store) { if(wolfSSL_CTX_load_system_CA_certs(backend->ctx) != WOLFSSL_SUCCESS) {