Opened 2 days ago

Last modified 20 hours ago

#5912 new enhancement

openssl-4.0.0

Reported by: Bruce Dubbs Owned by: lfs-book
Priority: normal Milestone: 13.1
Component: Book Version: git
Severity: normal Keywords:
Cc:

Description

New major version.

Change History (20)

comment:1 by Bruce Dubbs, 2 days ago

# Major changes between OpenSSL 3.6 and OpenSSL 4.0.0 [14 Apr 2026]

OpenSSL 4.0.0 is a feature release adding significant new functionality to OpenSSL.

This release incorporates the following potentially significant or incompatible changes:

  • Removed extra leading '00:' when printing key data such as an RSA modulus in hexadecimal format where the first (most significant) byte is >= 0x80.
  • Standardized the width of hexadecimal dumps to 24 bytes for signatures (to stay within the 80 characters limit) and 16 bytes for everything else.
  • Lower bounds checks are now enforced when using PKCS5_PBKDF2_HMAC API with FIPS provider.
  • Added AKID verification checks when X509_V_FLAG_X509_STRICT is set.
  • Augmented CRL verification process with several additional checks.
  • libcrypto no longer cleans up globally allocated data via atexit().
  • BIO_snprintf() now uses snprintf() provided by libc instead of internal implementation.
  • OPENSSL_cleanup() now runs in a global destructor, or not at all by default.
  • ASN1_STRING has been made opaque.
  • Signatures of numerous API functions, including those that are related to X509 processing, are changed to include const qualifiers for argument and return types, where suitable.
  • Deprecated X509_cmp_time(), X509_cmp_current_time(), and X509_cmp_timeframe() in favor of X509_check_certificate_times().
  • Removed support for the SSLv2 Client Hello.
  • Removed support for SSLv3. SSLv3 has been deprecated since 2015, and OpenSSL had it disabled by default since version 1.1.0 (2016).
  • Removed support for engines. The no-engine build option and the OPENSSL_NO_ENGINE macro are always present.
  • Support of deprecated elliptic curves in TLS according to [RFC 8422] was disabled at compile-time by default. To enable it, use the enable-tls-deprecated-ec configuration option.
  • Support of explicit EC curves was disabled at compile-time by default. To enable it, use the enable-ec_explicit_curves configuration option.
  • Removed c_rehash script tool. Use openssl rehash instead.
  • Removed the deprecated msie-hack option from the openssl ca command.
  • Removed BIO_f_reliable() implementation without replacement. It was broken since 3.0 release without any complaints.
  • Removed deprecated support for custom EVP_CIPHER, EVP_MD, EVP_PKEY, and EVP_PKEY_ASN1 methods.
  • Removed deprecated fixed SSL/TLS version method functions.
  • Removed deprecated functions ERR_get_state(), ERR_remove_state() and ERR_remove_thread_state(). The ERR_STATE object is now always opaque.
  • Dropped darwin-i386{,-cc} and darwin-ppc{,64}{,-cc} targets from Configurations.

This release adds the following new features:

  • Support for Encrypted Client Hello (ECH, [RFC 9849]). See doc/designs/ech-api.md for details.
  • Support for [RFC 8998], signature algorithm sm2sig_sm3, key exchange group curveSM2, and [tls-hybrid-sm2-mlkem] post-quantum group curveSM2MLKEM768.
  • cSHAKE function support as per [SP 800-185].
  • "ML-DSA-MU" digest algorithm support.
  • Support for SNMP KDF and SRTP KDF.
  • FIPS self tests can now be deferred and run as needed when installing the FIPS module with the -defer_tests option of the openssl fipsinstall command.
  • Support for using either static or dynamic VC runtime linkage on Windows.
  • Support for negotiated FFDHE key exchange in TLS 1.2 in accordance with [RFC 7919].

comment:2 by Bruce Dubbs, 2 days ago

Did a test build in chroot. Looked pretty clean but I did not log it.

All tests successful.

Files=361, Tests=4374, 37 wallclock secs ( 5.31 usr 0.42 sys + 339.35 cusr 43.32 csys = 388.40 CPU)

I don't understand cusr or csys. User and system I guess.

comment:3 by Bruce Dubbs, 2 days ago

Again in chroot, openssh built without issue.

comment:4 by pierre, 2 days ago

I think the problem might rather lie in dependent packages, since there are changes to the API.

in reply to:  2 comment:5 by pierre, 2 days ago

Replying to Bruce Dubbs:

Did a test build in chroot. Looked pretty clean but I did not log it.

All tests successful.

Files=361, Tests=4374, 37 wallclock secs ( 5.31 usr 0.42 sys + 339.35 cusr 43.32 csys = 388.40 CPU)

I don't understand cusr or csys. User and system I guess.

I think cusr is total computing time for user, that is sum of user times for each core. And similarly for csys.

comment:6 by Xi Ruoyao, 45 hours ago

An incomplete (found on my system) list of things requiring a rebuild for openssl:

  • openssh
  • git
  • sudo
  • wpa_supplicant
  • coreutils
  • kmod
  • systemd
  • rustc
  • cargo-c
  • lynx
  • libarchive
  • openldap
  • ruby
  • cryptsetup
  • neon
  • krb5
  • python
  • libnvme
  • pipewire
  • pulseaudio
  • Net::SSLeay
  • libssh2
  • libevent
  • cups
  • gst-plugins-bad
  • curl
Last edited 42 hours ago by Xi Ruoyao (previous) (diff)

comment:7 by Xi Ruoyao, 45 hours ago

It looks like "make test" now automatically uses all cores so we no longer need to set HARNESS_JOBS.

comment:8 by Xi Ruoyao, 44 hours ago

The Python 3 _ssl module fails to build. https://github.com/python/cpython/pull/146217 allows it to build but there's still an unresolved yet runtime issue: https://github.com/python/cpython/issues/148292

comment:9 by Xi Ruoyao, 43 hours ago

krb5 needs https://github.com/krb5/krb5/pull/1489 and https://github.com/krb5/krb5/pull/1490. Apply 1490 first, then 1489, to avoid conflict.

Last edited 20 hours ago by Xi Ruoyao (previous) (diff)

comment:10 by Xi Ruoyao, 43 hours ago

sudo needs https://github.com/sudo-project/sudo/pull/483 (manual operation needed).

in reply to:  7 comment:11 by Bruce Dubbs, 43 hours ago

Replying to Xi Ruoyao:

It looks like "make test" now automatically uses all cores so we no longer need to set HARNESS_JOBS.

We probably still need it for timing purposes, but other than mentioning it in the timing, we can probably remove it for the test instruction in the book.

comment:13 by Xi Ruoyao, 42 hours ago

If libssh2 is enabled, several curl tests fail with Failure establishing ssh session: -43, Failed getting banner. I don't know which package to blame. More strangely, if running one of those tests directly with ./runtests.pl in tests/ it passes.

comment:15 by Xi Ruoyao, 42 hours ago

openldap needs at least (I only tried a lib-only build) sed -e 's/cn->length/ASN1_STRING_length(cn)/g' -e 's/cn->data/ASN1_STRING_get0_data(cn)/g' -i libraries/libldap/tls_o.c (not submitted upstream yet).

comment:16 by Xi Ruoyao, 42 hours ago

gst-plugins-bad rebuilds fine but there are one new test failure in elements_dtls.

comment:17 by Xi Ruoyao, 42 hours ago

Last edited 42 hours ago by Xi Ruoyao (previous) (diff)

comment:18 by Xi Ruoyao, 23 hours ago

rustc is a little complicated, we need to update (or patch but I don't think patching is easier than updating) the shipped openssl and openssl-sys crates (used by cargo) to support openssl-4.0.0.

curl https://github.com/lfs-book/rust-openssl/archive/v0.10.77+openssl4/rust-openssl-0.10.77+openssl4.tar.gz -LO

cd rustc-1.94.1-src
tar xf ../rust-openssl-0.10.77+openssl4.tar.gz
mv rust-openssl-0.10.77+openssl4 rust-openssl

cat >> Cargo.toml << EOF   
[patch.crates-io]                                      
openssl = { path = "../../../rust-openssl/openssl" }                  
openssl-sys = { path = "../../../rust-openssl/openssl-sys" }
EOF

sed -ri src/tools/cargo/Cargo.lock.orig \
    -e '/name = "openssl-sys"/,/^$/{/source|checksum/d;s/0.9.111/0.9.113/}' \
    -e '/name = "openssl"/,/^$/{/source|checksum/d;s/0.10.75/0.10.77/}'     \
    -e '/name = "openssl-macros"/,/^$/{/source|checksum/d}'

I guess cargo-c needs something similar as it ships some code from cargo.

comment:19 by Xi Ruoyao, 20 hours ago

Net::SSLeay https://github.com/radiator-software/p5-net-ssleay/pull/553. Not merged yet but the test suite passes on 1.96 (the book has 1.94 now).

Note: See TracTickets for help on using tickets.