macOS: Reliably apply workaround for system curl 8.{3,4,5} LibreSSL backend

In commit f2596dfa0e (macOS: Work around bug in system curl 8.{3,4,5}
LibreSSL backend, 2024-07-16, v3.30.1~2^2) we tried to prefer
`secure-transport` on problematic versions of curl.  However, the
`curl_global_sslset` setting must be applied before every
`curl_global_init` call, not just the first one.  Otherwise a
second (or subsequent) download won't apply the work-around.
This commit is contained in:
Gregor Jasny
2025-04-29 10:46:28 +02:00
committed by Brad King
parent 750436c3a0
commit 1e1129c6fe
5 changed files with 7 additions and 16 deletions
+1 -2
View File
@@ -19,9 +19,8 @@ cmCTestCurl::cmCTestCurl(cmCTest* ctest)
, CurlOpts(ctest)
{
this->SetProxyType();
cmCurlInitOnce();
// In windows, this will init the winsock stuff
::curl_global_init(CURL_GLOBAL_ALL);
cm_curl_global_init(CURL_GLOBAL_ALL);
this->Curl = cm_curl_easy_init();
}
+1 -2
View File
@@ -171,9 +171,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(
headers = ::curl_slist_append(headers, h.c_str());
}
cmCurlInitOnce();
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
cm_curl_global_init(CURL_GLOBAL_ALL);
cmCTestCurlOpts curlOpts(this->CTest);
for (std::string const& file : files) {
/* get a curl handle */