Downloading cert store at build time

This commit is contained in:
Jerom Venneker
2025-08-06 14:32:44 +02:00
parent a72660959c
commit 48e869b61f
2 changed files with 14 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.26.0 FATAL_ERROR)
include(FetchContent)
set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE)
@@ -339,6 +340,18 @@ if (BUILD_REMOTE_CONTROL)
message(STATUS "OpenSSL not found (it's possible the version installed is too old). Disabling BUILD_REMOTE_CONTROL.")
set(BUILD_REMOTE_CONTROL 0)
endif()
FetchContent_Declare(
sslCertStore
URL https://curl.se/ca/cacert.pem
DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR}/networking
DOWNLOAD_NO_EXTRACT TRUE
)
FetchContent_MakeAvailable(
sslCertStore
)
endif()
if (ESPEAK)

View File

@@ -53,7 +53,7 @@ bool ArchipelagoClient::StartClient() {
uri = CVarGetString(CVAR_REMOTE_ARCHIPELAGO("ServerAddress"), "localhost:38281");
password = CVarGetString(CVAR_REMOTE_ARCHIPELAGO("Password"), "");
apClient = std::unique_ptr<APClient>(new APClient(uuid, AP_Client_consts::AP_GAME_NAME, uri, "cacert.pem"));
apClient = std::unique_ptr<APClient>(new APClient(uuid, AP_Client_consts::AP_GAME_NAME, uri, "networking/cacert.pem"));
CVarSetInteger(CVAR_REMOTE_ARCHIPELAGO("ConnectionStatus"), 1); // Connecting