configure.ac: fix libssl detection for OpenSSL 1.1.0+#317
Open
thegushi wants to merge 1 commit into
Open
Conversation
SSL_library_init() was deprecated in OpenSSL 1.1.0 and became a no-op macro, causing AC_LINK_IFELSE to fail even when libssl is present and shared. This broke ./configure on CentOS 8/9 Stream (OpenSSL 1.1.1) with "Cannot build shared opendkim against static openssl libraries." Replace the probe and AC_SEARCH_LIBS symbol with SSL_CTX_new/SSL_CTX_free, which are real functions in all supported OpenSSL versions (1.0.x, 1.1.x, 3.x). Fixes trusteddomainproject#138
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 #138.
Root cause
configure.acprobes for libssl usingSSL_library_init(). In OpenSSL 1.1.0this function was deprecated and became a no-op macro; it no longer exists as
a linkable symbol.
AC_LINK_IFELSEtherefore fails even when a shared libsslis present, producing the misleading error:
CentOS 8/9 Stream ships OpenSSL 1.1.1, which triggers this.
Fix
Replace both the
AC_LINK_IFELSEprobe and theAC_SEARCH_LIBSfallbackwith
SSL_CTX_free/SSL_CTX_new, which are real functions in all supportedOpenSSL versions (1.0.x, 1.1.x, 3.x).
Note: PR #162 (OpenSSL 3 upgrade) does not touch
configure.acfor thisissue, so this fix is independent and can land first.