1+ diff --git a/CMakeLists.txt b/CMakeLists.txt
2+ index c0cc0c57b8..aae23b6acd 100644
3+ --- a/CMakeLists.txt
4+ +++ b/CMakeLists.txt
5+ @@ -778,6 +778,8 @@ if(CURL_USE_OPENSSL)
6+ list(APPEND CURL_LIBS "stdc++")
7+ list(APPEND CMAKE_REQUIRED_LIBRARIES "stdc++")
8+ endif()
9+ + elseif(WIN32 AND CMAKE_COMPILER_IS_GNUCC AND HAVE_LIBRESSL)
10+ + list(APPEND CURL_LIBS "ws2_32") # Add a duplicate to make binutils ld resolve symbols
11+ endif()
12+
13+ if(HAVE_BORINGSSL)
14+ @@ -1506,6 +1508,8 @@ endif()
15+ #
16+ # CA handling
17+ #
18+ + option(CURL_CA_NATIVE_BY_DEFAULT "Use native CA store by default in the curl tool" OFF)
19+ +
20+ if(_curl_ca_bundle_supported)
21+ set(CURL_CA_BUNDLE "auto" CACHE
22+ STRING "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
23+ diff --git a/lib/curl_config.h.cmake b/lib/curl_config.h.cmake
24+ index 0838ddccfb..6be0b40ece 100644
25+ --- a/lib/curl_config.h.cmake
26+ +++ b/lib/curl_config.h.cmake
27+ @@ -34,6 +34,9 @@
28+ /* Default SSL backend */
29+ #cmakedefine CURL_DEFAULT_SSL_BACKEND "${CURL_DEFAULT_SSL_BACKEND}"
30+
31+ + /* Use native CA store by default in curl tool */
32+ + #cmakedefine CURL_CA_NATIVE_BY_DEFAULT 1
33+ +
34+ /* disables alt-svc */
35+ #cmakedefine CURL_DISABLE_ALTSVC 1
36+
37+ diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c
38+ index 975ef2a458..5d71f1bd08 100644
39+ --- a/src/tool_cfgable.c
40+ +++ b/src/tool_cfgable.c
41+ @@ -50,6 +50,12 @@ struct OperationConfig *config_alloc(struct GlobalConfig *global)
42+ config->file_clobber_mode = CLOBBER_DEFAULT;
43+ config->upload_flags = CURLULFLAG_SEEN;
44+ curlx_dyn_init(&config->postdata, MAX_FILE2MEMORY);
45+ +
46+ + #ifdef CURL_CA_NATIVE_BY_DEFAULT
47+ + config->native_ca_store = TRUE;
48+ + config->proxy_native_ca_store = TRUE;
49+ + #endif
50+ +
51+ return config;
52+ }
53+
154diff --git a/wcurl b/wcurl
255index 7b53b74..45857d6 100755
356--- a/scripts/wcurl
@@ -9,5 +62,3 @@ index 7b53b74..45857d6 100755
962- printf "%s\n" "$*" > /dev/stderr
1063+ printf "%s\n" "$*" >&2
1164 exit 1
12- }
13-
0 commit comments