build: Use the bundled CA cert in AppImage (#694)
* Added option to bundle CA * use bundled CA for AppImage * Fix bundled CA not working on Linux * revert change to add null terminated string * set IMHEX_USE_BUNDLED_CA to ON on Windows
This commit is contained in:
parent
f62edea450
commit
38162c0129
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
@ -277,6 +277,7 @@ jobs:
|
|||||||
-DRUST_PATH="$HOME/.cargo/bin/" \
|
-DRUST_PATH="$HOME/.cargo/bin/" \
|
||||||
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
-DIMHEX_PATTERNS_PULL_MASTER=ON \
|
||||||
-DIMHEX_PLUGINS_IN_SHARE=ON \
|
-DIMHEX_PLUGINS_IN_SHARE=ON \
|
||||||
|
-DIMHEX_USE_BUNDLED_CA=ON \
|
||||||
..
|
..
|
||||||
make -j 4 install DESTDIR=AppDir
|
make -j 4 install DESTDIR=AppDir
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
|
option(IMHEX_USE_BUNDLED_CA "Use the CA bundle in romfs instead of the system one" OFF)
|
||||||
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
|
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins" OFF)
|
||||||
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
|
option(IMHEX_STRIP_RELEASE "Strip the release builds" ON)
|
||||||
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
|
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)
|
||||||
|
@ -84,6 +84,8 @@ macro(detectOS)
|
|||||||
set(CMAKE_INSTALL_BINDIR ".")
|
set(CMAKE_INSTALL_BINDIR ".")
|
||||||
set(CMAKE_INSTALL_LIBDIR ".")
|
set(CMAKE_INSTALL_LIBDIR ".")
|
||||||
set(PLUGINS_INSTALL_LOCATION "plugins")
|
set(PLUGINS_INSTALL_LOCATION "plugins")
|
||||||
|
|
||||||
|
SET(IMHEX_USE_BUNDLED_CA ON)
|
||||||
elseif (APPLE)
|
elseif (APPLE)
|
||||||
add_compile_definitions(OS_MACOS)
|
add_compile_definitions(OS_MACOS)
|
||||||
set(CMAKE_INSTALL_BINDIR ".")
|
set(CMAKE_INSTALL_BINDIR ".")
|
||||||
@ -106,6 +108,11 @@ macro(detectOS)
|
|||||||
else ()
|
else ()
|
||||||
message(FATAL_ERROR "Unknown / unsupported system!")
|
message(FATAL_ERROR "Unknown / unsupported system!")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(IMHEX_USE_BUNDLED_CA)
|
||||||
|
add_compile_definitions(IMHEX_USE_BUNDLED_CA)
|
||||||
|
endif()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
# Detect 32 vs. 64 bit system
|
# Detect 32 vs. 64 bit system
|
||||||
|
@ -109,7 +109,7 @@ namespace hex {
|
|||||||
curl_easy_setopt(this->m_ctx, CURLOPT_NOSIGNAL, 1L);
|
curl_easy_setopt(this->m_ctx, CURLOPT_NOSIGNAL, 1L);
|
||||||
curl_easy_setopt(this->m_ctx, CURLOPT_NOPROGRESS, 0L);
|
curl_easy_setopt(this->m_ctx, CURLOPT_NOPROGRESS, 0L);
|
||||||
|
|
||||||
#if defined(OS_WINDOWS)
|
#if defined(IMHEX_USE_BUNDLED_CA)
|
||||||
curl_easy_setopt(this->m_ctx, CURLOPT_CAINFO, nullptr);
|
curl_easy_setopt(this->m_ctx, CURLOPT_CAINFO, nullptr);
|
||||||
curl_easy_setopt(this->m_ctx, CURLOPT_CAPATH, nullptr);
|
curl_easy_setopt(this->m_ctx, CURLOPT_CAPATH, nullptr);
|
||||||
curl_easy_setopt(this->m_ctx, CURLOPT_SSLCERTTYPE, "PEM");
|
curl_easy_setopt(this->m_ctx, CURLOPT_SSLCERTTYPE, "PEM");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user