Skip to content

ci: build with OpenSSL 4.x - #37

Merged
zhaojh329 merged 1 commit into
zhaojh329:masterfrom
yegorich:ci-openssl-4
Oct 12, 2026
Merged

zhaojh329 merged 1 commit into
zhaojh329:masterfrom
yegorich:ci-openssl-4

Conversation

@yegorich

Copy link
Copy Markdown
Contributor

The openssl job uses Ubuntu's libssl-dev, which is OpenSSL 3.0, so CI doesn't cover OpenSSL 4.x.
With #36, libuhttpd builds against OpenSSL 4.0, so this adds a matrix entry openssl4:

  • OpenSSL 4.0.3: downloaded from the official release and checked against its SHA-256. It's built
    as shared libraries, without docs and tests, and installed to ~/openssl.
  • Caching: the installation is cached with actions/cache, keyed by version, so it's only built
    once per version.
  • libuhttpd: built with -DUSE_OPENSSL=ON and PKG_CONFIG_PATH pointing to that installation.
  • Guard: the job fails if src/libuhttpd.so doesn't link libssl.so.4. Without it, a broken
    installation would let CMake fall back to the system OpenSSL 3, and the job would pass without
    testing 4.x.

The other jobs are unchanged. Updating to a later 4.x release means changing openssl_version and
openssl_sha256. rtty's CI has the same kind of job for Mbed TLS 4.x.

Testing

I ran the steps in an ubuntu:24.04 container, each with bash -eo pipefail as GitHub Actions does:

  • OpenSSL 4.0.3 downloads, passes the hash check, and builds.
  • CMake reports Found openssl, version 4.0.3, libuhttpd builds without warnings, and libuhttpd.so
    links libssl.so.4.
  • The existing openssl job still builds against OpenSSL 3.0.13.
  • With the OpenSSL 4.0.3 installation removed, CMake falls back to the system OpenSSL 3.0.13, and the
    guard fails the step as intended.

The workflow also passes on my fork, with all five jobs green. The openssl4 job built OpenSSL and
saved the openssl-4.0.3-ubuntu-24.04 cache:
https://github.com/yegorich/libuhttpd/actions/runs/38147582273

Ubuntu 24.04 only packages OpenSSL 3.x, so OpenSSL 4.x isn't covered
by CI. Add an openssl4 matrix entry that builds OpenSSL 4.0.3 from the
official release (SHA-256 checked, cached per version) and builds
libuhttpd against it with PKG_CONFIG_PATH.

The job fails if libuhttpd doesn't link libssl.so.4, so it can't pass
by silently falling back to the system OpenSSL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
@zhaojh329
zhaojh329 merged commit 0975d18 into zhaojh329:master Oct 12, 2026
5 checks passed
@yegorich
yegorich deleted the ci-openssl-4 branch October 12, 2026 08:56
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