mirror of
https://github.com/Kitware/CMake.git
synced 2025-06-09 15:38:15 +08:00

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.
21 lines
737 B
C++
21 lines
737 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#pragma once
|
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
|
|
|
#include <string>
|
|
|
|
#include <cm/optional>
|
|
#include <cm/string_view>
|
|
|
|
#include <cm3p/curl/curl.h>
|
|
|
|
void cmCurlInitOnce();
|
|
cm::optional<int> cmCurlParseTLSVersion(cm::string_view tls_version);
|
|
cm::optional<std::string> cmCurlPrintTLSVersion(int curl_tls_version);
|
|
std::string cmCurlSetCAInfo(::CURL* curl, const std::string& cafile = {});
|
|
std::string cmCurlSetNETRCOption(::CURL* curl, const std::string& netrc_level,
|
|
const std::string& netrc_file);
|
|
std::string cmCurlFixFileURL(std::string url);
|