mirror of
https://github.com/OpenTTD/OpenTTD
synced 2025-12-10 06:52:05 +01:00
Add: use https:// for content-service connections (#10448)
This requires the use of WinHTTP (for Windows) or libcurl (for all others except Emscripten). Emscripten does not support http(s) calls currently. On Linux it requires ca-certificates to be installed, so the HTTPS certificate can be validated. It is really likely this is installed on any modern machine, as most connections these days are HTTPS. (On MacOS and Windows the certificate store is filled by default) Reminder: in case the http(s):// connection cannot be established, OpenTTD falls back to a custom TCP-based connection to fetch the content from the content-service. Emscripten will always do this.
This commit is contained in:
@@ -124,6 +124,14 @@ find_package(LibLZMA)
|
||||
find_package(LZO)
|
||||
find_package(PNG)
|
||||
|
||||
if(WIN32 OR EMSCRIPTEN)
|
||||
# Windows uses WinHttp for HTTP requests.
|
||||
# Emscripten uses Javascript for HTTP requests.
|
||||
else()
|
||||
# All other targets use libcurl.
|
||||
find_package(CURL)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
if(NOT WIN32)
|
||||
find_package(Allegro)
|
||||
@@ -259,6 +267,10 @@ link_package(ZLIB TARGET ZLIB::ZLIB ENCOURAGED)
|
||||
link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGED)
|
||||
link_package(LZO)
|
||||
|
||||
if(NOT WIN32 AND NOT EMSCRIPTEN)
|
||||
link_package(CURL ENCOURAGED)
|
||||
endif()
|
||||
|
||||
if(NOT OPTION_DEDICATED)
|
||||
link_package(Fluidsynth)
|
||||
link_package(SDL)
|
||||
@@ -368,6 +380,7 @@ if(WIN32)
|
||||
imm32
|
||||
usp10
|
||||
psapi
|
||||
winhttp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user