1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: Always use default CA Cert

This commit is contained in:
WerWolv 2023-07-16 19:56:07 +02:00
parent 7631778edb
commit 0a6815da8f
4 changed files with 0 additions and 17 deletions

View File

@ -385,7 +385,6 @@ jobs:
-DIMHEX_COMMIT_BRANCH="${GITHUB_REF##*/}" \
-DIMHEX_ENABLE_LTO=ON \
-DIMHEX_PLUGINS_IN_SHARE=ON \
-DIMHEX_USE_BUNDLED_CA=ON \
..
DESTDIR=AppDir ninja install

View File

@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 3.20)
# 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_STRIP_RELEASE "Strip the release builds" ON)
option(IMHEX_OFFLINE_BUILD "Enable offline build" OFF)

View File

@ -47,7 +47,6 @@ macro(detectOS)
set(CMAKE_INSTALL_BINDIR ".")
set(CMAKE_INSTALL_LIBDIR ".")
set(PLUGINS_INSTALL_LOCATION "plugins")
set(IMHEX_USE_BUNDLED_CA ON)
elseif (APPLE)
add_compile_definitions(OS_MACOS)
set(CMAKE_INSTALL_BINDIR ".")
@ -71,10 +70,6 @@ macro(detectOS)
message(FATAL_ERROR "Unknown / unsupported system!")
endif()
if(IMHEX_USE_BUNDLED_CA)
add_compile_definitions(IMHEX_USE_BUNDLED_CA)
endif()
endmacro()
# Detect 32 vs. 64 bit system

View File

@ -36,16 +36,6 @@ namespace hex {
curl_easy_setopt(this->m_curl, CURLOPT_XFERINFODATA, this);
curl_easy_setopt(this->m_curl, CURLOPT_XFERINFOFUNCTION, progressCallback);
curl_easy_setopt(this->m_curl, CURLOPT_PROXY, s_proxyUrl.c_str());
#if defined(IMHEX_USE_BUNDLED_CA)
curl_easy_setopt(this->m_curl, CURLOPT_CAINFO, nullptr);
curl_easy_setopt(this->m_curl, CURLOPT_CAPATH, nullptr);
curl_easy_setopt(this->m_curl, CURLOPT_SSLCERTTYPE, "PEM");
curl_easy_setopt(this->m_curl, CURLOPT_SSL_CTX_FUNCTION, sslCtxFunction);
this->m_caCert = std::make_unique<mbedtls_x509_crt>();
curl_easy_setopt(this->m_curl, CURLOPT_SSL_CTX_DATA, this->m_caCert.get());
#endif
}
CURLcode HttpRequest::sslCtxFunction(CURL *ctx, void *sslctx, void *userData) {