fix(Crypto,NetSSL): build with OpenSSL no-deprecated (#5415) - #5416
Open
matejk wants to merge 5 commits into
Open
fix(Crypto,NetSSL): build with OpenSSL no-deprecated (#5415)#5416matejk wants to merge 5 commits into
matejk wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two remaining build failures against OpenSSL 3.x compiled with
no-deprecated(#5415), completing the work started in #5313:SSL_get_peer_certificateis only a macro alias on OpenSSL 3.0+ and disappears underOPENSSL_NO_DEPRECATED. The three call sites (SSLManager.cpp,SecureSocketImpl.cpp) now callSSL_get1_peer_certificateon 3.0+; semantics are identical (+1 reference), so behavior is unchanged. OpenSSL 1.1.1 and LibreSSL keep the existing call.poco_assert_dbgexpressions inEVPPKey.hreferenced theRSA/EC_KEYtypedefs, which OpenSSL 3 hides underOPENSSL_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.linux-gcc-cmake-openssl-no-deprecatedprobe builds Crypto/NetSSL/JWT with-DOPENSSL_NO_DEPRECATED -D_DEBUGagainst 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