mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user