From 465300df8d19ce17176a95ef014061ced0b97431 Mon Sep 17 00:00:00 2001 From: maj00r Date: Sun, 15 Nov 2026 20:43:08 +0100 Subject: [PATCH] fix(editor): an https proxy checked with the same certificates CURLOPT_PROXY_CAINFO gets the file found for CURLOPT_CAINFO, so a download through an https:// proxy on Fedora or RHEL doesn't fail on the proxy's certificate. --- editor/editorHttp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/editorHttp.cpp b/editor/editorHttp.cpp index 60606331e..81a195aeb 100644 --- a/editor/editorHttp.cpp +++ b/editor/editorHttp.cpp @@ -239,7 +239,13 @@ bool client::get(std::string const &Url, std::vector &Out, std::st ::curl_easy_setopt(m_platform->curl, CURLOPT_URL, Url.c_str()); ::curl_easy_setopt(m_platform->curl, CURLOPT_USERAGENT, "MaSzyna-editor"); if (auto const &certificates{certificates_file()}; false == certificates.empty()) + { ::curl_easy_setopt(m_platform->curl, CURLOPT_CAINFO, certificates.c_str()); +#if LIBCURL_VERSION_NUM >= 0x073400 + // an https proxy is checked with the same file + ::curl_easy_setopt(m_platform->curl, CURLOPT_PROXY_CAINFO, certificates.c_str()); +#endif + } ::curl_easy_setopt(m_platform->curl, CURLOPT_FOLLOWLOCATION, 1L); ::curl_easy_setopt(m_platform->curl, CURLOPT_MAXREDIRS, 10L); // http kept for the services the user types; nothing else, also where a redirect leads