diff options
author | Brad King <brad.king@kitware.com> | 2024-07-16 19:50:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-07-17 13:13:26 (GMT) |
commit | f2596dfa0ebce746ca4c69f671d3cac3fe8fc032 (patch) | |
tree | db2daedaa7ec7e80ac49c57eb696908342d1d2a5 /Source/cmFileCommand.cxx | |
parent | 3b2ef9b54ca91ed9e0be2680558021b3d000a2ea (diff) | |
download | CMake-f2596dfa0ebce746ca4c69f671d3cac3fe8fc032.zip CMake-f2596dfa0ebce746ca4c69f671d3cac3fe8fc032.tar.gz CMake-f2596dfa0ebce746ca4c69f671d3cac3fe8fc032.tar.bz2 |
macOS: Work around bug in system curl 8.{3,4,5} LibreSSL backend
Since commit d3cbee99e3 (macOS: Prefer building with system-provided
curl, 2024-05-09, v3.30.0-rc1~130^2~1) CMake uses the macOS-provided
curl, which uses the LibreSSL backend by default. This exposes us to
curl issue 12525, created and fixed by the following upstream curl
commits:
* commit `bec0c5bbf` (openssl: switch to modern init for
LibreSSL 2.7.0+, 2023-08-07, `curl-8_3_0~201`)
* commit `9f2d2290d` (openssl: re-match LibreSSL deinit with init,
2023-12-15, `curl-8_6_0~219`)
Work around the bug by preferring the secure-transport backend by
default on the problematic versions of curl.
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index ce8cc2a..6265f82 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -2115,6 +2115,7 @@ bool HandleDownloadCommand(std::vector<std::string> const& args, url = cmCurlFixFileURL(url); ::CURL* curl; + cmCurlInitOnce(); ::curl_global_init(CURL_GLOBAL_DEFAULT); curl = ::curl_easy_init(); if (!curl) { @@ -2488,6 +2489,7 @@ bool HandleUploadCommand(std::vector<std::string> const& args, url = cmCurlFixFileURL(url); ::CURL* curl; + cmCurlInitOnce(); ::curl_global_init(CURL_GLOBAL_DEFAULT); curl = ::curl_easy_init(); if (!curl) { |