]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: `CURL_CA_FALLBACK` only works with OpenSSL
authorViktor Szakats <commit@vsz.me>
Fri, 22 Aug 2025 15:54:23 +0000 (17:54 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 22 Aug 2025 22:02:33 +0000 (00:02 +0200)
Ref: 2f6524ce3c3a8231c62d1e0c8af509fe5b0228a0 #18364
Ref: #18362

Closes #18365

CMakeLists.txt
docs/INSTALL-CMAKE.md

index 5e0bf4bf98563a706067721f5dc505af3bcbf5cd..a1bc875285f91fb2bc231ada1eefb112d02a7726 100644 (file)
@@ -1501,12 +1501,16 @@ if(_curl_ca_bundle_supported)
   set(CURL_CA_BUNDLE "auto" CACHE
     STRING "Path to the CA bundle. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
   set(CURL_CA_FALLBACK OFF CACHE
-    BOOL "Use built-in CA store of TLS backend. Defaults to OFF")
+    BOOL "Use built-in CA store of OpenSSL. Defaults to OFF")
   set(CURL_CA_PATH "auto" CACHE
     STRING "Location of default CA path. Set 'none' to disable or 'auto' for auto-detection. Defaults to 'auto'.")
   set(CURL_CA_EMBED "" CACHE
     STRING "Path to the CA bundle to embed in the curl tool.")
 
+  if(CURL_CA_FALLBACK AND NOT CURL_USE_OPENSSL)
+    message(FATAL_ERROR "CURL_CA_FALLBACK only works with OpenSSL.")
+  endif()
+
   if(CURL_CA_BUNDLE STREQUAL "")
     message(FATAL_ERROR "Invalid value of CURL_CA_BUNDLE. Use 'none', 'auto' or file path.")
   elseif(CURL_CA_BUNDLE STREQUAL "none")
index cad83d909e5a89d281bf6bc36b08832b1f61cf52..956bd104f08750cb60cc178dffa2ba33036ca353 100644 (file)
@@ -258,7 +258,7 @@ target_link_libraries(my_target PRIVATE CURL::libcurl)
 
 - `CURL_CA_BUNDLE`:                         Path to the CA bundle. Set `none` to disable or `auto` for auto-detection. Default: `auto`
 - `CURL_CA_EMBED`:                          Path to the CA bundle to embed in the curl tool. Default: (disabled)
-- `CURL_CA_FALLBACK`:                       Use built-in CA store of TLS backend. Default: `OFF`
+- `CURL_CA_FALLBACK`:                       Use built-in CA store of OpenSSL. Default: `OFF`
 - `CURL_CA_PATH`:                           Location of default CA path. Set `none` to disable or `auto` for auto-detection. Default: `auto`
 - `CURL_CA_SEARCH_SAFE`:                    Enable safe CA bundle search (within the curl tool directory) on Windows. Default: `OFF`