Skip to content

build: require openssl 3.5.x or build vendored - #14348

Draft
ploxiln wants to merge 3 commits into
apple:mainfrom
ploxiln:openssl35
Draft

ploxiln wants to merge 3 commits into
apple:mainfrom
ploxiln:openssl35

Conversation

@ploxiln

@ploxiln ploxiln commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

I think this is not 100% working yet, particularly due to our build containers using a grpc pre-built against openssl-1.1.1 - so maybe this is a reason to fully vendor grpc as in #14337

We could/should make builds of dependency ExternalProject builds faster by making them work with ccache/sccache, could do that via a compiler wrapper script ...

$<${is_cxx_compile}:-Wno-error=format>
$<${is_cxx_compile}:-Wunused-variable>
$<${is_cxx_compile}:-Wno-deprecated>
$<${is_cxx_compile}:-Wno-deprecated-declarations> # for openssl old md5/sha1 api

@ploxiln ploxiln Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update where we do md5 / sha1 to use newer API to avoid needing this, but there's some complication from contrib/md5/md5.h which just passes through openssl/md5.h if that seems to be available, but in some cases/binaries may be used a smaller md5-only substitute ...

Comment thread cmake/awssdk.cmake
-Dcrypto_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
-DLibCrypto_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR}
-DLibCrypto_STATIC_LIBRARY=${OPENSSL_CRYPTO_LIBRARY}
-DLibCrypto_SHARED_LIBRARY=""

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably some of this can be "cleaned-up", I just added until it worked ...

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@ploxiln

ploxiln commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

oh, right, this depends on a trivial perl library addition to the build container image for the openssl configure script: FoundationDB/fdb-build-support#122

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: e520e5a
  • Duration 0:17:29
  • Result: ❌ FAILED
  • Error: Error while executing command: ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ${HOME}/.ssh_key ec2-user@${MAC_EC2_HOST} /opt/homebrew/bin/bash --login ./build_pr_macos.sh. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: e520e5a
  • Duration 0:19:51
  • Result: ❌ FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux RHEL 9

  • Commit ID: e520e5a
  • Duration 0:20:06
  • Result: ❌ FAILED
  • Error: Error while executing command: ninja -v -C build_output -j ${NPROC} all packages strip_targets. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: e520e5a
  • Duration 0:22:00
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: e520e5a
  • Duration 0:57:28
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: e520e5a
  • Duration 1:11:50
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: e520e5a
  • Duration 1:47:15
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

evanspearman pushed a commit to evanspearman/pkgs that referenced this pull request Nov 25, 2026
…s 2026-11-01) (gominimal#1140)

* openssl: 4.1.0 (3.6 support ends 2026-11-01)

OpenSSL 3.6 is supported until 2026-11-01; 4.1 until Nov 2027
(openssl-library.org/source). sha256 is the release's published
openssl-4.1.0.tar.gz.sha256 (verified against a download).

4.x layout changes reflected in outputs:
- SHLIB_VERSION=4: libssl.so.4 / libcrypto.so.4. Every symbol is
  versioned OPENSSL_4.0.0, so it can coexist with libssl.so.3 from
  packages/openssl-3.5 in one process.
- c_rehash removed (use `openssl rehash`); dropped its output.
- ENGINE support removed: no engines-3 directory; dropped its output.
- ossl-modules now globs usr/lib/ossl-modules (it pointed at
  engines-3, so legacy.so was never shipped).

--openssldir=/etc/ssl, --libdir=lib, shared, zlib-dynamic unchanged;
all are still valid 4.x Configure options. build.sh now fails closed
if the .so.4 / ossl-modules layout is missing.

DRAFT, NOT PUSHED: the tarball is not yet mirrored to
gs://minimal-staging-archives/openssl/openssl/openssl-4.1.0.tar.gz.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* openssl-3.5: new compat package (3.5.9 LTS, libssl.so.3 beside 4.x)

OpenSSL 3.5 is the LTS line (supported to 2030-04-08). This package
ships its libssl.so.3 / libcrypto.so.3 on the default loader path and
a dev tree under /usr/lib/openssl-3.5, so code that cannot use 4.x keeps
working after packages/openssl moves to 4.1:

- rustc-1.98.1's stage0: both sealed rustc-1.97.1 bedrock tarballs ship
  a cargo with DT_NEEDED libssl.so.3 + libcrypto.so.3 (read from the
  amd64 and arm64 tarballs' ELF dynamic sections).
- actions-runner 2.336.0 bundles .NET 8 (global.json sdk 8.0.422); only
  .NET 10 got the OpenSSL 4 loader (dotnet/runtime#135534).
- foundationdb 7.3, whose C++ does not compile against 4.x's const X509
  API; upstream is itself moving to a pinned 3.5 (apple/foundationdb#14348).

Nothing collides with packages/openssl: no /usr/bin, /usr/include,
/usr/lib/pkgconfig or /etc/ssl files. OPENSSLDIR stays /etc/ssl, so the
CA store and openssl.cnf are shared. Symbol versions differ
(OPENSSL_3.x vs OPENSSL_4.0.0), so one process can load both.

The package name carries the series, so pkgmgr's name pin keeps it on
3.5.x. sha256 is the release's published openssl-3.5.9.tar.gz.sha256
(verified against a download). DRAFT, NOT PUSHED: not yet mirrored to
gs://minimal-staging-archives/openssl/openssl/openssl-3.5.9.tar.gz.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* rustc-1.98.1: give the bedrock stage0 its libssl.so.3 (openssl-3.5)

Both sealed rustc-1.97.1 bedrock tarballs (amd64 6ec57e96..., arm64
de0724a4...) ship usr/lib/rustc-1.97.1/bin/cargo with DT_NEEDED
libssl.so.3 and libcrypto.so.3. With packages/openssl on 4.x only
libssl.so.4 exists, so the stage0 cargo would fail to load and the rung,
packages/rust and every Rust package behind it would fail on both arches.

openssl-3.5 goes into the amd64 bedrock spec's runtime_deps and into the
rung's build_deps (the arm64 stage0 is a bare Source). The rung's own
cargo still builds against 4.x: its vendored openssl-sys is 0.9.117.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* actions-runner: runtime-depend on openssl-3.5 (bundled .NET 8 needs libssl.so.3)

actions-runner 2.336.0 bundles .NET 8 (src/global.json sdk 8.0.422).
Its System.Security.Cryptography.Native shim dlopens libssl.so.3 and has
no OpenSSL 4 (.so.4) support: the loader change was backported only to
.NET 10 (dotnet/runtime#135534, merged 2026-10-10; tracking issue
dotnet/runtime#125619 targets 12.0). Without libssl.so.3 every HTTPS
call the runner makes fails at run time once packages/openssl is 4.x.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* python: carry the OpenSSL 4 support for _ssl (cpython#149783, Modules/)

CPython 3.14 has no OpenSSL 4 support: the 3.14 backport,
python/cpython#149783 ("[3.14] gh-148292: Add OpenSSL 4 support"), was
closed unmerged pending 3.15.0 feedback. Unpatched, 3.14.10's _ssl.c
declares and calls SSLv3/TLSv1/TLSv1_1/TLSv1_2_method(), which 4.0
removed, so _ssl.so has unresolved symbols and the ssl module fails to
import.

The patch is the PR's Modules/ hunks (gh-146207 #146217, gh-148600
#148601, gh-148292 #149102, all merged on main): fixed-version methods
treated as absent on 4.x, const X509_NAME/ASN1_STRING accessors,
_ssl_data_40.h, and SSLEOFError bookkeeping for 4.x's EOF behaviour.
Arch Linux carries the same PR in its OpenSSL 4 rebuild. Each hunk is
guarded for 4.x or is a const qualifier, so it is a no-op on OpenSSL 3.
`git apply --check` against v3.14.10's files: applies, offsets only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* socat: ASN1_STRING accessors for OpenSSL 4

OpenSSL 4.0 made ASN1_STRING opaque. socat 1.8.1.3's
openssl_handle_peer_certificate() reads pName->d.iPAddress->data and
->length directly, a hard compile error on 4.x. Carry Debian's
1.8.1.3-2 patch (10-Use-OpenSSL-ASN1_STRING-accessor-functions...);
Fedora rawhide carries the identical hunk (socat-1.8.1.0-openssl4.patch).
Checked: applies cleanly to the mirrored tarball (sha256 06602ffd...).
No-op on OpenSSL 3. socat's fixed-version method calls are behind
configure HAVE_ checks, so they drop out on 4.x by themselves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* codex, sccache, zellij: lock openssl-sys 0.9.117 for OpenSSL 4

openssl-sys before 0.9.114 aborts in its build script on OpenSSL 4
("This crate is only compatible with OpenSSL (version 1.1.0, 1.1.1, or
3.x)"); 0.9.114 (2026-04-19) added 4.x. These three lock 0.9.111 and
build it against the system library:
- codex 0.164.0: openssl-sys via native-tls on linux-gnu (vendored only
  for musl). Arch hit the same panic: openai/codex#35404 (open).
- sccache 0.18.0: default "all" pulls native-tls; 0.19.0 still locks
  0.9.111. Arch: mozilla/sccache#2780.
- zellij 0.45.1: openssl-sys via isahc's vendored curl-sys, with
  OPENSSL_NO_VENDOR=1.

Each gets a hand-written Cargo.lock patch to openssl-sys 0.9.117 (and
openssl 0.10.81 where it is locked: codex, sccache), the pair Arch pins.
Checksums from the crates.io index; openssl 0.10.81 drops once_cell from
its dependencies, which other crates still use. Each patch was checked
with git apply against upstream's lock at the pinned tag (sccache and
zellij after their webpki lock patch). build.sh fails closed if
0.9.117 is not locked.

Already 4.x-ready, no change: atuin and cloud-hypervisor (0.9.117),
nushell and typst (0.9.116), gurk (no openssl-sys).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* foundationdb: build against openssl-3.5 (7.3 does not compile on OpenSSL 4)

FoundationDB 7.3.79's TLS code assigns X509_get_subject_name() /
X509_get_issuer_name() / X509_NAME_get_entry() / X509_NAME_ENTRY_get_data()
results to non-const pointers (flow/TLSConfig.actor.cpp: X509_NAME
*subject, *issuer; match_name_criteria / match_criteria_entry), and
flow/MkCert.cpp edits a certificate's subject name in place. All four
return const in OpenSSL 4, which is an error in C++. No upstream 4.x
fix exists; upstream is moving the other way, to a pinned 3.5 or
vendored OpenSSL (apple/foundationdb#14348, open).

So build against packages/openssl-3.5: explicit OPENSSL_* CMake cache
variables plus -I on CFLAGS/CXXFLAGS so no translation unit picks up the
4.x headers in /usr/include. build.sh fails closed unless fdbserver and
libfdb_c link libssl.so.3 and not libssl.so.4. Runtime dep switches
from openssl to openssl-3.5.

UNVERIFIED: not built. Header shadowing is the risk to watch.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* wget: guard SSLv3_client_method for OpenSSL 4

wget 1.25.0 guards the call with #ifndef OPENSSL_NO_SSL3_METHOD, but
OpenSSL 4 removed the function without defining that macro, so the world
build failed (implicit declaration, openssl.c:230). Also require OpenSSL < 4,
as wget already does for SSLv2. --secure-protocol=SSLv3 then gets no method
and fails cleanly, the same as SSLv2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* zellij: link the system libcurl instead of curl-sys's bundled curl 8.4.0

The world build failed on zellij (both arches): its default `vendored_curl`
feature (isahc/static-curl) compiles curl-sys's bundled curl 8.4.0, which
reads OpenSSL's now-opaque ASN1_INTEGER (vtls/openssl.c:455). Build the other
two default features only, so curl-sys links our libcurl (pkgconf + curl as
build deps, curl libs at runtime), and fail closed unless the binary NEEDs
libcurl.so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* curl: build with HTTP/2 (nghttp2), so curl-sys users link it on OpenSSL 4

zellij still compiled curl-sys's bundled curl 8.4.0 after dropping
vendored_curl: isahc requests http2, and curl-sys falls back to its bundled
copy when `curl-config --features` lacks HTTP2. Our curl had no nghttp2.
Build it with --with-nghttp2 (as Arch/Debian/Fedora do) and fail closed if
configure did not enable it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Revert "curl: build with HTTP/2 (nghttp2), so curl-sys users link it on OpenSSL 4"

This reverts commit 543010e.

* zellij: drop isahc's http2 so curl-sys links the system libcurl (OpenSSL 4)

Dropping vendored_curl was not enough: with isahc's http2 feature on,
curl-sys only links a system libcurl whose curl-config reports HTTP2, and
ours has no nghttp2 (adding it cycles curl -> nghttp2 -> cmake -> curl, so
the curl change is reverted). It then compiled its bundled curl 8.4.0, which
fails on OpenSSL 4's opaque ASN1_INTEGER. The patch removes "http2" from the
isahc declaration plus the matching Cargo.lock edit (libnghttp2-sys), so
--locked still holds; the readelf check still requires libcurl.so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* foundationdb: require libssl.so.3 of fdbserver only; forbid .so.4 everywhere

The world build failed foundationdb's own guard on arm64:
libfdb_c_shim.so "does not link libssl.so.3". The shim dlopen()s libfdb_c at
run time and links no SSL itself, so requiring .so.3 of every libfdb_c*.so
was too strict. Keep the safety property for every ELF we ship (no
libssl/libcrypto .so.4) and fdbserver as the positive control.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ci: re-trigger build (or-tools' FetchContent hit GitLab overload cloning eigen)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* zellij: runtime-depend on ca-certificates (system libcurl verifies against /etc/ssl/certs; CR on gominimal#1140)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* or-tools: pinned, mirrored Eigen 3.4.0 + BZip2 instead of build-time GitLab clones

The OpenSSL 4.1 world build failed on or-tools three times today: its
FetchContent git-clones Eigen and BZip2 from gitlab.com, which answered
"unable to handle this request due to load". BZip2 was also pinned only to
GIT_TAG "master". Both are now sha256-pinned Sources mirrored to
gs://minimal-staging-archives (Eigen 3.4.0; BZip2 at master commit 66c46b8c,
2026-10-28), handed to FetchContent through FETCHCONTENT_SOURCE_DIR_EIGEN3 /
_BZIP2, with or-tools' own patches applied as its PATCH_COMMAND would
(checked with git apply --check against these trees). Fails closed if
FetchContent still downloads either. Part of pkgs#1146.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* openssl 4.1: review from msample (python test_ssl hunks, 4.x standalone test, AGENTS.md)

- python: carry the Lib/test/test_ssl.py hunks of cpython#149783 too (rebased
  to 3.14.10, exact context). The shipped test suite failed 6 of 206 test_ssl
  tests against the patched _ssl; these are upstream's matching expectation
  changes, plus test_got_eof for gh-148292. HAS_TLSv1_2 == False is upstream
  gh-159387, noted for the next bump.
- openssl: a standalone `openssl4_behaviour` test, msample's script: .so.4 and no
  engines, the legacy provider + MD4, TLS 1.2 and 1.3 loopback handshakes
  verified against a throwaway P-256 cert by IP SAN.
- openssl-3.5: link the pkgmgr-rs#1140 series pin it relies on (deployed), and
  why it is load-bearing (Repology marks every 3.5.x legacy/outdated).
- wget: the OpenSSL 4 patch applies with -F0 like python/socat's (checked:
  exact context on 1.25.0).
- AGENTS.md: an OpenSSL pattern section: port to 4.x first, openssl-3.5 for
  what can't, how to build/depend/check against it, and 4.1's dropped CN
  fallback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* openssl: import Test for the openssl4_behaviour standalone test

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants