Repository navigation
Fix OpenSSL builds with deprecated APIs disabled - #634
Merged
Merged
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.
OpenSSL builds with deprecated declarations hidden fail on legacy initialization, locking, ECDH, and certificate getter APIs. On current master,
OPENSSL_NO_DEPRECATEDwith a 3.0 API compatibility level reproduces the four errors in #518 and an additional error forSSL_get_peer_certificate.Compile the legacy initialization calls, locking callback/mutexes, and ECDH setup only for OpenSSL before 1.1. Modern versions already use
OPENSSL_init_ssl. On OpenSSL 3, useSSL_get1_peer_certificate, preserving the owned reference and existingX509_freebehavior; older OpenSSL and LibreSSL keep their existing getter.Add
make -f makefile.dev test_openssl_no_deprecatedand CI jobs against Debian Bullseye's OpenSSL 1.1.1 and Bookworm's OpenSSL 3.0. Both build the library, CLI, and complete test suite with deprecated APIs hidden and deprecated declarations treated as errors. The Bullseye job uses Debian's archived repositories for the older packages. The target overrides cached TLS backend selections and rediscovers cached OpenSSL library/header paths.Give test credential generation its own minimal OpenSSL configuration. OpenSSL 1.1.1 otherwise combines the system's CA extension with
-addext, generating duplicate Basic Constraints and invalid test certificates. This keeps verification enabled and provides valid credentials on both versions.Validation:
git diff --checkpass.References: OpenSSL initialization, certificate getter ownership and compatibility.
Closes #518.