mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-22 21:50:51 -05:00
Move to OpenSSL 3.5.9 and libcurl 8.23.0 (#17293)
* Bump libcurl to 8.17.0 7.75.0 is from March 2021 and has 80 published CVEs against it. The ones our use reaches are the Transfer-Encoding chain memory bomb from any hostile server (CVE-2022-32206, CVE-2023-23916) and credential leaks on redirects (CVE-2022-27774, CVE-2022-27776); the rest are closed too. 8.17.0 is the last release that builds against OpenSSL 1.1.1: from 8.18.0 on, lib/vtls/openssl.c refuses anything older than 3.0.0, so moving further waits for the OpenSSL 3 switch. curl's CMake renamed its options along the way: CMAKE_USE_* became CURL_USE_*, ENABLE_MANUAL became ENABLE_CURL_MANUAL, CURL_STATICLIB became BUILD_STATIC_LIBS, and ENABLE_VERSIONED_SYMBOLS and USE_RTMP are gone. libpsl, libidn2, brotli, zstd and WebSockets are now on by default and are switched off explicitly so the feature set stays HTTP(S) over OpenSSL with zlib, and no new shared library ends up in the AppImage or the macOS bundle. The 7.75-specific clang-cl probe workaround is no longer needed. Verified on Linux by building the dependency in isolation against the bundled OpenSSL 1.1.1w: curl-config reports FILE FTP FTPS HTTP HTTPS IPFS IPNS and the OpenSSL backend only, and every libcurl-using source in src/ passes a syntax check against the new headers. * Move to OpenSSL 3.5.9 and libcurl 8.23.0 OpenSSL 1.1.1 left public support in September 2023; every fix since, including this year's DTLS ones that libdatachannel's camera transport reaches, ships only to paid subscribers. 3.5 is the long-term-support series, maintained until April 2030. curl follows in the same change because 8.18.0 and later refuse to build against anything older than OpenSSL 3.0, so the two cannot move separately. Recipe changes: the tarball comes from the release assets instead of the tag archive, no-tests shortens the build, the ARM64 /Gs4096 override goes (1.1.1's VC configs passed /Gs0; 3.x does not set /Gs at all), and the hand-written CMake config advertises 3.5.9. The deprecated low-level MD5_* calls still compile: OpenSSL 3 keeps them behind a deprecation warning, which the build already silences for dependency headers. Verified on Linux by building OpenSSL, curl, libdatachannel, FFmpeg and CPython in an isolated dependency tree: libcrypto identifies as 3.5.9, curl-config reports the OpenSSL backend with HTTP(S)/FTP(S)/FILE only, and the bundled python3 imports ssl against 3.5.9 and creates a default context. Every OpenSSL-using source file in src/ passes a syntax check against the new headers. Windows and macOS are left to CI. * Compare the Full libcurl Version Number in Http.cpp The two guards tested LIBCURL_VERSION_MINOR alone, so at 8.x they went false: the progress callback declared with curl_off_t was registered as CURLOPT_PROGRESSFUNCTION, which libcurl calls with doubles, and the TLS backend check compiled out. Compare LIBCURL_VERSION_NUM instead. * Link SystemConfiguration Into libcurl on macOS libcurl 8's Curl_macos_init calls SCDynamicStoreCopyProxies when IPv6 is enabled. curl's own CMake package links the framework, but our FindCURL module builds CURL::libcurl from the static archive alone, so both macOS builds failed to link. * Keep OpenSSL's Default Security Level at 1 OpenSSL 3 raises the default from level 1 to 2. Level 2 refuses DHE with 1024-bit parameters on every connection and, when the peer is verified, 1024-bit RSA keys as well, so old self-signed printer certificates and firmware TLS stacks would stop connecting. Configure with OPENSSL_TLS_SECURITY_LEVEL=1 to keep the level 1.1.1 shipped with. TLS 1.0 and 1.1 need level 0 in 3.x and stay refused either way. Also drop no-ssl3-method (the default in 3.x) and CURL_DISABLE_SMB (SMB is opt-in since curl 8.23), delete the hand-written OpenSSL CMake package that nothing reads (the build finds OpenSSL in module mode, and 3.x installs its own lib/cmake/OpenSSL), stop probing the Flatpak runtime for OpenSSL because the GNOME 50 SDK ships 3.5.9 and would have replaced the pinned build, and keep a note of the MD5_* callers still to port. * Build the Pinned OpenSSL and curl in the Flatpak The Flatpak block stopped probing for OpenSSL so the GNOME SDK's copy could not stand in for the pinned build, but the find_package(CURL) it kept resolves the SDK's CURLConfig.cmake, whose find_dependency(OpenSSL) leaves OPENSSL_FOUND set. Both dep_OpenSSL and dep_CURL were skipped, and libdatachannel's configure then failed looking for a static libcrypto under /app. Drop the CURL probe too: the Flatpak's curl has to link the bundled OpenSSL, so neither of them can come from the SDK. * Pass the Legacy Progress Callback to CURLOPT_PROGRESSFUNCTION The pre-7.32 branch registered xfercb, declared with curl_off_t, for an option libcurl calls with doubles. xfercb_legacy is the matching one and was unused.
This commit is contained in:
1 parent
9199df0811
commit
4ab9f7a732
12 files changed
+65
-341
No files matched your search
@@ -876,6 +876,12 @@ if (NOT WIN32)
|
||||
else()
|
||||
target_link_libraries(libcurl INTERFACE crypt32)
|
||||
endif()
|
||||
if (APPLE)
|
||||
# libcurl's macOS start-up calls SCDynamicStoreCopyProxies. curl's own
|
||||
# CMake package links the framework, but our FindCURL module builds
|
||||
# CURL::libcurl from the static archive alone.
|
||||
target_link_libraries(libcurl INTERFACE "-framework SystemConfiguration")
|
||||
endif()
|
||||
|
||||
if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_CURL)
|
||||
if (NOT APPLE)
|
||||
|
||||
Vendored
+8
-7
@@ -348,10 +348,13 @@ if(FLATPAK)
|
||||
# also, yes, this reduces CI by not needing to vendor certain deps
|
||||
find_package(ZLIB)
|
||||
find_package(PNG)
|
||||
find_package(CURL)
|
||||
find_package(JPEG)
|
||||
find_package(OpenSSL 1.1...<3.2)
|
||||
find_package(CURL)
|
||||
# Not OpenSSL or CURL: the manifest stages the pinned tarballs, and the
|
||||
# Flatpak must run the same OpenSSL build, with the same default security
|
||||
# level, as the other platforms, with a curl linked against it. The GNOME
|
||||
# SDK ships both, and its CURLConfig.cmake finds OpenSSL as a dependency
|
||||
# (find_dependency leaves OPENSSL_FOUND set here), so probing either one
|
||||
# skips dep_OpenSSL and dep_CURL and builds against the SDK's copies.
|
||||
endif()
|
||||
|
||||
set(ZLIB_PKG "")
|
||||
@@ -410,10 +413,8 @@ include(libnoise/libnoise.cmake)
|
||||
|
||||
include(Draco/Draco.cmake)
|
||||
|
||||
# I *think* 1.1 is used for *just* md5 hashing?
|
||||
# 3.1 has everything in the right place, but the md5 funcs used are deprecated
|
||||
# a grep across the repo shows it is used for other things
|
||||
# TODO: update openssl and everything that uses <openssl/md5.h>
|
||||
# TODO: utils.cpp, Format/bbs_3mf.cpp and GUI/Printer/PrinterFileSystem.cpp
|
||||
# still use the MD5_* functions that 3.0 deprecated; port them to EVP.
|
||||
set(OPENSSL_PKG "")
|
||||
if(NOT OPENSSL_FOUND)
|
||||
include(OpenSSL/OpenSSL.cmake)
|
||||
|
||||
Vendored
+22
-34
@@ -1,8 +1,7 @@
|
||||
set(_curl_platform_flags
|
||||
-DENABLE_IPV6:BOOL=ON
|
||||
-DENABLE_VERSIONED_SYMBOLS:BOOL=ON
|
||||
-DENABLE_THREADED_RESOLVER:BOOL=ON
|
||||
-DENABLE_MANUAL:BOOL=OFF
|
||||
-DENABLE_CURL_MANUAL:BOOL=OFF
|
||||
-DCURL_DISABLE_LDAP:BOOL=ON
|
||||
-DCURL_DISABLE_LDAPS:BOOL=ON
|
||||
-DCURL_DISABLE_RTSP:BOOL=ON
|
||||
@@ -10,30 +9,37 @@ set(_curl_platform_flags
|
||||
-DCURL_DISABLE_TELNET:BOOL=ON
|
||||
-DCURL_DISABLE_POP3:BOOL=ON
|
||||
-DCURL_DISABLE_IMAP:BOOL=ON
|
||||
-DCURL_DISABLE_SMB:BOOL=ON
|
||||
-DCURL_DISABLE_SMTP:BOOL=ON
|
||||
-DCURL_DISABLE_GOPHER:BOOL=ON
|
||||
-DCURL_DISABLE_TFTP:BOOL=ON
|
||||
-DCURL_DISABLE_MQTT:BOOL=ON
|
||||
#-DHTTP_ONLY=ON
|
||||
-DCURL_DISABLE_WEBSOCKETS:BOOL=ON
|
||||
|
||||
-DCMAKE_USE_GSSAPI:BOOL=OFF
|
||||
-DCMAKE_USE_LIBSSH2:BOOL=OFF
|
||||
-DUSE_RTMP:BOOL=OFF
|
||||
# Optional libraries curl 8 enables or probes for by default. Keep the set
|
||||
# of features the same as before: OpenSSL and zlib only, so no new shared
|
||||
# library sneaks into the AppImage or the macOS bundle.
|
||||
-DCURL_USE_GSSAPI:BOOL=OFF
|
||||
-DCURL_USE_LIBSSH2:BOOL=OFF
|
||||
-DCURL_USE_LIBSSH:BOOL=OFF
|
||||
-DCURL_USE_LIBPSL:BOOL=OFF
|
||||
-DUSE_LIBIDN2:BOOL=OFF
|
||||
-DUSE_NGHTTP2:BOOL=OFF
|
||||
-DUSE_MBEDTLS:BOOL=OFF
|
||||
-DCURL_USE_MBEDTLS:BOOL=OFF
|
||||
-DCURL_ZLIB:STRING=ON
|
||||
-DCURL_BROTLI:STRING=OFF
|
||||
-DCURL_ZSTD:STRING=OFF
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
#set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_SCHANNEL=ON)
|
||||
set(_curl_platform_flags ${_curl_platform_flags} -DCMAKE_USE_OPENSSL=ON -DCURL_CA_PATH:STRING=none)
|
||||
#set(_curl_platform_flags ${_curl_platform_flags} -DCURL_USE_SCHANNEL=ON)
|
||||
set(_curl_platform_flags ${_curl_platform_flags} -DCURL_USE_OPENSSL=ON -DCURL_CA_PATH:STRING=none)
|
||||
elseif (APPLE)
|
||||
set(_curl_platform_flags
|
||||
|
||||
${_curl_platform_flags}
|
||||
|
||||
#-DCMAKE_USE_SECTRANSP:BOOL=ON
|
||||
-DCMAKE_USE_OPENSSL:BOOL=ON
|
||||
#-DCURL_USE_SECTRANSP:BOOL=ON
|
||||
-DCURL_USE_OPENSSL:BOOL=ON
|
||||
|
||||
-DCURL_CA_PATH:STRING=none
|
||||
)
|
||||
@@ -42,7 +48,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
|
||||
${_curl_platform_flags}
|
||||
|
||||
-DCMAKE_USE_OPENSSL:BOOL=ON
|
||||
-DCURL_USE_OPENSSL:BOOL=ON
|
||||
|
||||
-DCURL_CA_PATH:STRING=none
|
||||
-DCURL_CA_BUNDLE:STRING=none
|
||||
@@ -56,33 +62,15 @@ else()
|
||||
set(_curl_static ON)
|
||||
endif()
|
||||
|
||||
# curl 7.75's configure probes and code rely on C laxness cl allows but clang
|
||||
# errors on (implicit function declarations, int* vs u_long* in ioctlsocket),
|
||||
# which flips probe results and misconfigures nonblock.c into the AmigaOS
|
||||
# IoctlSocket branch. Relax both diagnostics so the probes behave like cl, and
|
||||
# pin the camel-case probes off since they only "pass" by implicit declaration.
|
||||
set(_curl_c_flags_line "")
|
||||
set(_curl_probe_overrides "")
|
||||
if (MSVC AND CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
set(_curl_c_flags_line "-DCMAKE_C_FLAGS:STRING=-Wno-implicit-function-declaration -Wno-incompatible-pointer-types")
|
||||
set(_curl_probe_overrides -DHAVE_IOCTLSOCKET_CAMEL=0 -DHAVE_IOCTLSOCKET_CAMEL_FIONBIO=0)
|
||||
endif ()
|
||||
|
||||
orcaslicer_add_cmake_project(CURL
|
||||
# GIT_REPOSITORY https://github.com/curl/curl.git
|
||||
# GIT_TAG curl-7_75_0
|
||||
URL https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.zip
|
||||
URL_HASH SHA256=a63ae025bb0a14f119e73250f2c923f4bf89aa93b8d4fafa4a9f5353a96a765a
|
||||
URL https://github.com/curl/curl/archive/refs/tags/curl-8_23_0.zip
|
||||
URL_HASH SHA256=4f443969ea4ea6ccb5ac984488683bb92384bc4df0affa3938ce77f20b30d853
|
||||
DEPENDS ${ZLIB_PKG}
|
||||
# PATCH_COMMAND ${GIT_EXECUTABLE} checkout -f -- . && git clean -df &&
|
||||
# ${GIT_EXECUTABLE} apply --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/curl-mods.patch
|
||||
CMAKE_ARGS
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
-DBUILD_CURL_EXE:BOOL=OFF
|
||||
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||
-DCURL_STATICLIB=${_curl_static}
|
||||
"${_curl_c_flags_line}"
|
||||
${_curl_probe_overrides}
|
||||
-DBUILD_STATIC_LIBS:BOOL=${_curl_static}
|
||||
${_curl_platform_flags}
|
||||
)
|
||||
|
||||
|
||||
Vendored
+19
-30
@@ -17,6 +17,7 @@ else()
|
||||
endif()
|
||||
|
||||
set(_openssl_dir ${DESTDIR})
|
||||
set(_openssl_extra_cflags "")
|
||||
|
||||
if(WIN32)
|
||||
set(_openssl_msvc_env CC=cl CXX=cl RC=rc CL=/FS)
|
||||
@@ -25,21 +26,14 @@ if(WIN32)
|
||||
# spaces, e.g. exported by CLion, silently produces no .obj files and the
|
||||
# lib step fails with LNK1181). Pin the upstream toolchain.
|
||||
# Keep rc.exe resolved from the MSVC developer environment as well. The
|
||||
# absolute Windows SDK path contains spaces and OpenSSL 1.1.1 writes it to
|
||||
# the generated nmake file without quoting, which skips .res generation.
|
||||
# absolute Windows SDK path contains spaces and OpenSSL writes it to the
|
||||
# generated nmake file without quoting, which skips .res generation.
|
||||
# /FS serializes access to OpenSSL's shared generated PDB when cl is
|
||||
# driven through nmake from a Ninja configure step.
|
||||
set(_conf_cmd ${CMAKE_COMMAND} -E env ${_openssl_msvc_env} perl Configure )
|
||||
set(_cross_comp_prefix_line "")
|
||||
if("${DEPS_ARCH}" STREQUAL "arm64")
|
||||
# OpenSSL's VC configs pass /Gs0, which puts a __chkstk probe in every
|
||||
# function. MSVC 14.51 and 14.52 (VS 2026) for ARM64 emit that call
|
||||
# before the prologue saves LR, so the function returns into itself;
|
||||
# in tls_parse_all_extensions that breaks every TLS handshake. 14.44
|
||||
# (VS 2022) is unaffected. Restore cl's default threshold: Configure
|
||||
# appends /Gs4096 after /Gs0, and the later option wins.
|
||||
set(_openssl_extra_cflags /Gs4096)
|
||||
endif()
|
||||
# 1.1.1's VC configs passed /Gs0, which needed a /Gs4096 override on ARM64
|
||||
# (MSVC 14.51/14.52 mis-emit the __chkstk probe). 3.x no longer sets /Gs.
|
||||
set(_make_cmd ${CMAKE_COMMAND} -E env ${_openssl_msvc_env} nmake)
|
||||
set(_install_cmd ${CMAKE_COMMAND} -E env ${_openssl_msvc_env} nmake install_sw )
|
||||
else()
|
||||
@@ -56,10 +50,10 @@ else()
|
||||
else()
|
||||
# A static library that is embedded into a shared object must not export
|
||||
# its symbols. On Linux the running process also loads the system OpenSSL
|
||||
# 3.x (WebKitGTK/gnutls pull in libcrypto.so.3), and CPython's _ssl and
|
||||
# (WebKitGTK/gnutls pull in libcrypto.so.3), and CPython's _ssl and
|
||||
# _hashlib are dlopened (RTLD_LOCAL) DSOs that each embed this OpenSSL.
|
||||
# With default visibility their unversioned OpenSSL references are
|
||||
# preempted by that global 3.x copy, mixing the 1.1.1 and 3.x ABIs and
|
||||
# preempted by that global copy, mixing two OpenSSL builds and
|
||||
# corrupting the heap (ssl.create_default_context() aborts). Hidden
|
||||
# visibility makes each embedded copy self-contained. Linux-only: macOS
|
||||
# binds dylibs with a two-level namespace (no interposition) and ships no
|
||||
@@ -85,28 +79,30 @@ endif()
|
||||
|
||||
ExternalProject_Add(dep_OpenSSL
|
||||
#EXCLUDE_FROM_ALL ON
|
||||
URL "https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz"
|
||||
URL_HASH SHA256=2130E8C2FB3B79D1086186F78E59E8BC8D1A6AEDF17AB3907F4CB9AE20918C41
|
||||
# URL "https://github.com/openssl/openssl/archive/refs/tags/openssl-3.1.2.tar.gz"
|
||||
# URL_HASH SHA256=8c776993154652d0bb393f506d850b811517c8bd8d24b1008aef57fbe55d3f31
|
||||
# 3.5 is the long-term-support series (supported until April 2030).
|
||||
URL "https://github.com/openssl/openssl/releases/download/openssl-3.5.9/openssl-3.5.9.tar.gz"
|
||||
URL_HASH SHA256=603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a
|
||||
DOWNLOAD_DIR ${DEP_DOWNLOAD_DIR}/OpenSSL
|
||||
CONFIGURE_COMMAND ${_conf_cmd} ${_cross_arch}
|
||||
"--openssldir=${_openssl_dir}"
|
||||
"--prefix=${DESTDIR}"
|
||||
# OpenSSL's linux-x86_64 target sets multilib=64, so it installs to
|
||||
# <prefix>/lib64 while every other dep uses <prefix>/lib. CPython's
|
||||
# --with-openssl only ever emits -L<dir>/lib, so it misses the bundled
|
||||
# static libs and silently links the system OpenSSL instead -- which,
|
||||
# against 1.1.1w headers, leaves _ssl.so with an undefined
|
||||
# SSL_get_peer_certificate (removed in OpenSSL 3.x). Pin libdir so the
|
||||
# prefix stays single-layout.
|
||||
# --with-openssl only ever emits -L<dir>/lib, so it would miss the
|
||||
# bundled static libs and silently link the system OpenSSL instead.
|
||||
# Pin libdir so the prefix stays single-layout.
|
||||
"--libdir=lib"
|
||||
${_cross_comp_prefix_line}
|
||||
${_openssl_extra_cflags}
|
||||
# 3.x raises the default security level from 1 to 2. Keep 1, the level
|
||||
# 1.1.1 shipped with: it still accepts the 1024-bit RSA and DH that old
|
||||
# self-signed printer certificates and firmware TLS stacks use. TLS
|
||||
# 1.0 and 1.1 need level 0 in 3.x and stay refused at either level.
|
||||
-DOPENSSL_TLS_SECURITY_LEVEL=1
|
||||
no-shared
|
||||
no-asm
|
||||
no-ssl3-method
|
||||
no-dynamic-engine
|
||||
no-tests
|
||||
BUILD_IN_SOURCE ON
|
||||
BUILD_COMMAND ${_make_cmd}
|
||||
INSTALL_COMMAND ${_install_cmd}
|
||||
@@ -118,13 +114,6 @@ if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||
set_target_properties(dep_OpenSSL PROPERTIES VS_PLATFORM_TOOLSET "$(DefaultPlatformToolset)")
|
||||
endif ()
|
||||
|
||||
ExternalProject_Add_Step(dep_OpenSSL install_cmake_files
|
||||
DEPENDEES install
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory openssl "${DESTDIR}${CMAKE_INSTALL_LIBDIR}/cmake/openssl"
|
||||
WORKING_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}"
|
||||
)
|
||||
|
||||
if (NOT WIN32)
|
||||
# OpenSSL's object rules do not depend on the configured flags or paths, so
|
||||
# reconfiguring it (a new compiler flag, a different --openssldir) relinks
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
# This is a basic version file for the Config-mode of find_package().
|
||||
# It is used by write_basic_package_version_file() as input file for configure_file()
|
||||
# to create a version-file which can be installed along a config.cmake file.
|
||||
#
|
||||
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
|
||||
# the requested version string are exactly the same and it sets
|
||||
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
|
||||
# but only if the requested major version is the same as the current one.
|
||||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
set(PACKAGE_VERSION "1.1.1k")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("1.1.1k" MATCHES "^([0-9]+)\\.")
|
||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
set(CVF_VERSION_MAJOR "1.1.1k")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
# both endpoints of the range must have the expected major version
|
||||
math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1")
|
||||
if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR
|
||||
AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX)
|
||||
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX)))
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
else()
|
||||
if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
|
||||
set(PACKAGE_VERSION_COMPATIBLE TRUE)
|
||||
else()
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
|
||||
set(PACKAGE_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# if the installed project requested no architecture check, don't perform the check
|
||||
if("FALSE")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
|
||||
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
|
||||
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
|
||||
math(EXPR installedBits "8 * 8")
|
||||
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
endif()
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/openssl-targets.cmake")
|
||||
@@ -1,29 +0,0 @@
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file for configuration "Debug".
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Import target "OpenSSL::SSL" for configuration "Debug"
|
||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/libssl.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::SSL )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::SSL "${_IMPORT_PREFIX}/lib/libssl.lib" )
|
||||
|
||||
# Import target "OpenSSL::Crypto" for configuration "Debug"
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "CXX"
|
||||
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/libcrypto.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::Crypto )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::Crypto "${_IMPORT_PREFIX}/lib/libcrypto.lib" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
@@ -1,29 +0,0 @@
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file for configuration "Release".
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Import target "OpenSSL::SSL" for configuration "Release"
|
||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libssl.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::SSL )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::SSL "${_IMPORT_PREFIX}/lib/libssl.lib" )
|
||||
|
||||
# Import target "OpenSSL::Crypto" for configuration "Debug"
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
|
||||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libcrypto.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::Crypto )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::Crypto "${_IMPORT_PREFIX}/lib/libcrypto.lib" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
@@ -1,29 +0,0 @@
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file for configuration "RelWithDebInfo".
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Import target "OpenSSL::SSL" for configuration "RelWithDebInfo"
|
||||
set_property(TARGET OpenSSL::SSL APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX"
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libssl.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::SSL )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::SSL "${_IMPORT_PREFIX}/lib/libssl.lib" )
|
||||
|
||||
# Import target "OpenSSL::Crypto" for configuration "RelWithDebInfo"
|
||||
set_property(TARGET OpenSSL::Crypto APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "CXX"
|
||||
IMPORTED_LOCATION_RELWITHDEBINFO "${_IMPORT_PREFIX}/lib/libcrypto.lib"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS OpenSSL::Crypto )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_OpenSSL::Crypto "${_IMPORT_PREFIX}/lib/libcrypto.lib" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
-104
@@ -1,104 +0,0 @@
|
||||
# Generated by CMake
|
||||
|
||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
|
||||
message(FATAL_ERROR "CMake >= 2.6.0 required")
|
||||
endif()
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(VERSION 2.6...3.18)
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file.
|
||||
#----------------------------------------------------------------
|
||||
|
||||
# Commands may need to know the format version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
||||
set(_targetsDefined)
|
||||
set(_targetsNotDefined)
|
||||
set(_expectedTargets)
|
||||
foreach(_expectedTarget OpenSSL::SSL OpenSSL::Crypto)
|
||||
list(APPEND _expectedTargets ${_expectedTarget})
|
||||
if(NOT TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsNotDefined ${_expectedTarget})
|
||||
endif()
|
||||
if(TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsDefined ${_expectedTarget})
|
||||
endif()
|
||||
endforeach()
|
||||
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
cmake_policy(POP)
|
||||
return()
|
||||
endif()
|
||||
if(NOT "${_targetsDefined}" STREQUAL "")
|
||||
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
|
||||
endif()
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
|
||||
|
||||
# Compute the installation prefix relative to this file.
|
||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
|
||||
if(_IMPORT_PREFIX STREQUAL "/")
|
||||
set(_IMPORT_PREFIX "")
|
||||
endif()
|
||||
|
||||
# Create imported target OpenSSL::SSL
|
||||
add_library(OpenSSL::SSL STATIC IMPORTED)
|
||||
|
||||
set_target_properties(OpenSSL::SSL PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
)
|
||||
|
||||
add_library(OpenSSL::Crypto STATIC IMPORTED)
|
||||
|
||||
set_target_properties(OpenSSL::Crypto PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
message(FATAL_ERROR "This file relies on consumers using CMake 2.8.12 or greater.")
|
||||
endif()
|
||||
|
||||
# Load information for each installed configuration.
|
||||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
file(GLOB CONFIG_FILES "${_DIR}/openssl-targets-*.cmake")
|
||||
foreach(f ${CONFIG_FILES})
|
||||
include(${f})
|
||||
endforeach()
|
||||
|
||||
# Cleanup temporary variables.
|
||||
set(_IMPORT_PREFIX)
|
||||
|
||||
# Loop over all imported files and verify that they actually exist
|
||||
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
||||
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
||||
if(NOT EXISTS "${file}" )
|
||||
message(FATAL_ERROR "The imported target \"${target}\" references the file
|
||||
\"${file}\"
|
||||
but this file does not exist. Possible reasons include:
|
||||
* The file was deleted, renamed, or moved to another location.
|
||||
* An install or uninstall procedure did not complete successfully.
|
||||
* The installation package was faulty and contained
|
||||
\"${CMAKE_CURRENT_LIST_FILE}\"
|
||||
but not all the files it references.
|
||||
")
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_FILES_FOR_${target})
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_TARGETS)
|
||||
|
||||
# This file does not depend on other imported targets which have
|
||||
# been exported from the same project but in a separate export set.
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
cmake_policy(POP)
|
||||
@@ -274,16 +274,17 @@ modules:
|
||||
sha256: 66dfbaee288f2bc43172440a55d0235dfc7bf885dda6435c038e8000e79582cb
|
||||
dest: external-packages/Assimp
|
||||
|
||||
# OpenSSL 1.1.1w (GNOME SDK has 3.x; OrcaSlicer requires 1.1.x)
|
||||
# OpenSSL 3.5.9 (pinned so every platform ships the same OpenSSL; the
|
||||
# bundled CPython's _ssl is built against it)
|
||||
- type: file
|
||||
url: https://github.com/openssl/openssl/archive/OpenSSL_1_1_1w.tar.gz
|
||||
sha256: 2130e8c2fb3b79d1086186f78e59e8bc8d1a6aedf17ab3907f4cb9ae20918c41
|
||||
url: https://github.com/openssl/openssl/releases/download/openssl-3.5.9/openssl-3.5.9.tar.gz
|
||||
sha256: 603f5602e2eef00d77fbd429d34dcd5822bb301757a1bc9cdb24c670f1eb859a
|
||||
dest: external-packages/OpenSSL
|
||||
|
||||
# CURL 7.75.0 (built from source to link against OpenSSL 1.1.x)
|
||||
# CURL 8.23.0 (built from source to link against the bundled OpenSSL)
|
||||
- type: file
|
||||
url: https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.zip
|
||||
sha256: a63ae025bb0a14f119e73250f2c923f4bf89aa93b8d4fafa4a9f5353a96a765a
|
||||
url: https://github.com/curl/curl/archive/refs/tags/curl-8_23_0.zip
|
||||
sha256: 4f443969ea4ea6ccb5ac984488683bb92384bc4df0affa3938ce77f20b30d853
|
||||
dest: external-packages/CURL
|
||||
|
||||
# OCCT (OpenCASCADE) V8_0_1
|
||||
|
||||
@@ -238,7 +238,7 @@ bool Http::priv::ca_file_supported(::CURL *curl)
|
||||
|
||||
if (curl == nullptr) { return res; }
|
||||
|
||||
#if LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 48
|
||||
#if LIBCURL_VERSION_NUM >= 0x073000 // 7.48.0: CURLINFO_TLS_SSL_PTR
|
||||
::curl_tlssessioninfo *tls;
|
||||
if (::curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &tls) == CURLE_OK) {
|
||||
if (tls->backend == CURLSSLBACKEND_SCHANNEL || tls->backend == CURLSSLBACKEND_DARWINSSL) {
|
||||
@@ -457,14 +457,14 @@ void Http::priv::http_perform()
|
||||
::curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, headers_cb);
|
||||
|
||||
::curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
|
||||
#if LIBCURL_VERSION_MAJOR >= 7 && LIBCURL_VERSION_MINOR >= 32
|
||||
#if LIBCURL_VERSION_NUM >= 0x072000 // 7.32.0: CURLOPT_XFERINFOFUNCTION
|
||||
::curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, xfercb);
|
||||
::curl_easy_setopt(curl, CURLOPT_XFERINFODATA, static_cast<void*>(this));
|
||||
#ifndef _WIN32
|
||||
(void)xfercb_legacy; // prevent unused function warning
|
||||
#endif
|
||||
#else
|
||||
::curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, xfercb);
|
||||
::curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, xfercb_legacy);
|
||||
::curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, static_cast<void*>(this));
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user