Skip to content

Commit

Permalink
Client: HttpClient: Enable CURLSSLOPT_NATIVE_CA
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Aug 24, 2024
1 parent 580822c commit 0ee6821
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/game/client/updater/http_client.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#include <stdexcept>
#include <filesystem>
#include <FileSystem.h>
#include <tier2/tier2.h>
#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;
Expand Down Expand Up @@ -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<std::mutex> lock(m_Mutex);
Expand Down

0 comments on commit 0ee6821

Please sign in to comment.