From 0ee6821a44c16157bd008811d82396c04041acdd Mon Sep 17 00:00:00 2001 From: tmp64 Date: Sat, 24 Aug 2024 21:22:58 +0700 Subject: [PATCH] Client: HttpClient: Enable CURLSSLOPT_NATIVE_CA --- src/game/client/updater/http_client.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/game/client/updater/http_client.cpp b/src/game/client/updater/http_client.cpp index ea3b3828..18e87b27 100644 --- a/src/game/client/updater/http_client.cpp +++ b/src/game/client/updater/http_client.cpp @@ -1,12 +1,10 @@ #include +#include #include -#include #include "hud.h" #include "cl_util.h" #include "http_client.h" -constexpr char CA_FILE_PATH[] = "ui/resource/ca-certificates.crt"; - CHttpClient &CHttpClient::Get() { static CHttpClient instance; @@ -149,6 +147,13 @@ void CHttpClient::WorkerThreadFunc() noexcept LogPrintf(ConColor::Yellow, "HTTP Client: Warning! SSL certificate check disabled with -bhl_no_ssl_check\n"); } + if (gEngfuncs.CheckParm("-bhl_curl_verbose", nullptr)) + curl_easy_setopt(hCurl, CURLOPT_VERBOSE, 1); + +#if PLATFORM_LINUX + curl_easy_setopt(hCurl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); +#endif + for (;;) { std::unique_lock lock(m_Mutex);