Skip to content

fix(Crypto,NetSSL): build with OpenSSL no-deprecated (#5415) - #5416

Open
matejk wants to merge 5 commits into
mainfrom
5415-openssl-no-deprecated
Open

fix(Crypto,NetSSL): build with OpenSSL no-deprecated (#5415)#5416
matejk wants to merge 5 commits into
mainfrom
5415-openssl-no-deprecated

Conversation

@matejk

@matejk matejk commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Fixes the two remaining build failures against OpenSSL 3.x compiled with no-deprecated (#5415), completing the work started in #5313:

  • NetSSL: SSL_get_peer_certificate is only a macro alias on OpenSSL 3.0+ and disappears under OPENSSL_NO_DEPRECATED. The three call sites (SSLManager.cpp, SecureSocketImpl.cpp) now call SSL_get1_peer_certificate on 3.0+; semantics are identical (+1 reference), so behavior is unchanged. OpenSSL 1.1.1 and LibreSSL keep the existing call.
  • Crypto: the poco_assert_dbg expressions in EVPPKey.h referenced the RSA/EC_KEY typedefs, which OpenSSL 3 hides under OPENSSL_NO_DEPRECATED_3_0; this broke Debug builds (_DEBUG). The asserts are now guarded, with a reduced EVP_PKEY-only assert when the types are hidden. Thanks to @GregDomjan for the report and the patch this is based on.
  • CI: new linux-gcc-cmake-openssl-no-deprecated probe builds Crypto/NetSSL/JWT with -DOPENSSL_NO_DEPRECATED -D_DEBUG against stock libssl-dev, so both failure modes stay covered without a custom OpenSSL build.

Verified on macOS (clang, Homebrew OpenSSL 3) and Linux (gcc, OpenSSL 3): no-deprecated Debug build compiles cleanly, Crypto and NetSSL test suites pass; default builds unchanged.

Fixes #5415

@matejk matejk added this to the Release 1.15.4 milestone Jul 25, 2026
@matejk matejk added the bug label Jul 25, 2026
@matejk matejk mentioned this pull request Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenSSL no_deprecated

1 participant