mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-22 21:50:51 -05:00
* 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.