Added a CMake option to use the bundled TLS certificates with cURL.

This commit is contained in:
Leon Styhre 2021-11-25 17:34:34 +01:00
parent 1f9f9b903c
commit 360be460a2
2 changed files with 6 additions and 1 deletions

View file

@ -32,6 +32,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMake/Utils
option(GL "Set to ON if targeting Desktop OpenGL" ${GL})
option(GLES "Set to ON if targeting Embedded OpenGL" ${GLES})
option(RPI "Set to ON to enable Raspberry Pi specific build" ${RPI})
option(BUNDLED_CERTS "Set to ON to use bundled TLS/SSL certificates" ${BUNDLED_CERTS})
option(CEC "Set to ON to enable CEC" ${CEC})
option(VIDEO_HW_DECODING "Set to ON to enable FFmpeg HW decoding" ${VIDEO_HW_DECODING})
option(VLC_PLAYER "Set to ON to build the VLC-based video player" ${VLC_PLAYER})
@ -254,6 +255,10 @@ if(RPI)
add_definitions(-D_RPI_)
endif()
if(BUNDLED_CERTS OR WIN32)
add_definitions(-DUSE_BUNDLED_CERTIFICATES)
endif()
if(DEFINED libCEC_FOUND)
add_definitions(-DHAVE_LIBCEC)
endif()

View file

@ -59,7 +59,7 @@ HttpReq::HttpReq(const std::string& url)
mHandle = curl_easy_init();
#if defined(_WIN64)
#if defined(USE_BUNDLED_CERTIFICATES)
// On Windows, use the bundled cURL TLS/SSL certificates (which actually come from the
// Mozilla project). There is a possibility to use the OS provided Schannel certificates
// but I haven't been able to get this to work and it also seems to be problematic on