Skip to content

chore: update ssl submodule for OpenSSL 4.0 support - #36

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

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

Conversation

@yegorich

Copy link
Copy Markdown
Contributor

This updates the src/ssl submodule from b385396 to 65edff2, the merge of zhaojh329/ssl#9:

  • OpenSSL 4.0: SSL_set1_dnsname()/SSL_set1_ipaddr() replace the deprecated SSL_set1_host().
    Before, libuhttpd failed to build against OpenSSL 4.0, because it builds with -Werror by default:
    src/ssl/openssl.c:321:5: error: 'SSL_set1_host' is deprecated: Since OpenSSL 4.0 [-Werror=deprecated-declarations]
    
  • CMake: an OpenSSL found by pkg-config is now used with its own include and library directories.
    Before, an OpenSSL outside the default paths was found (Found openssl, version 4.0.3), but
    libuhttpd.so was built against the system OpenSSL and linked libssl.so.3.

The SSL_set1_host() call is only used on the client side, but openssl.c is always compiled, so the
build failure affects libuhttpd too. The server code is unchanged.

Testing

Built on Ubuntu 22.04 (gcc 11) on top of current master (42a7a75), without warnings, against:

  • OpenSSL 4.0.3 (via PKG_CONFIG_PATH; libuhttpd.so links libssl.so.4);
  • the system OpenSSL 3.0.2;
  • wolfSSL 5.2.0;
  • Mbed TLS 2.28.0, 3.6.7 and 4.1.1;
  • -DSSL_SUPPORT=OFF.

With OpenSSL 4.0.3 and 3.0.2, I ran example/simple_server -s with EC and RSA certificates, using TLS
1.2 and 1.3. In all 8 combinations, these work:

  • keep-alive with two requests on one connection;
  • a 3 MB download (checksum compared);
  • POST to /echo;
  • closing the connection after a Connection: close request.

A quick run with wolfSSL and Mbed TLS 4.1.1 (GET, download, and closing after an HTTP/1.0 request, with
TLS 1.2 and 1.3) also passes.

rtty gets the same submodule update in zhaojh329/rtty#167.

Bump src/ssl to 65edff2 (zhaojh329/ssl#9):

- Use SSL_set1_dnsname()/SSL_set1_ipaddr() with OpenSSL 4.0, where
  SSL_set1_host() is deprecated. Before, the build failed with
  OpenSSL 4.0 because of -Werror.
- Use the include and library directories pkg-config reports for
  OpenSSL. Before, an OpenSSL outside the default paths was found, but
  the build used the system OpenSSL.

Tested the HTTPS example server with OpenSSL 4.0.3 and 3.0.2, using EC
and RSA certificates with TLS 1.2 and 1.3. Also built with wolfSSL and
Mbed TLS 2.28.0, 3.6.7 and 4.1.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
@zhaojh329
zhaojh329 merged commit 910fbbd into zhaojh329:master Oct 12, 2026
4 checks passed
@yegorich
yegorich deleted the 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