Fix OCSP detection during build (9.2.x) #9754
Merged
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.
The configure script fails to detect OCSP support when building ATS with OpenSSL 3.0.
This isn't a problem in the
masterbranch, which copied OpenSSL's OCSP code into ATS itself in #9624. However, this remains a problem on existing releases and downstream packages seem to be affected by it. Here's a list of the few I checked:This happens because OpenSSL 3.0 made changes to its APIs that affected how ATS detects OCSP support. ATS checks the existence of a few functions, including
OCSP_REQ_CTX_add1_headerandOCSP_REQ_CTX_set1_req, by attempting to link to them usingAC_CHECK_FUNCS. In OpenSSL 3.0, these functions were turned into macros making them uneligible for detection withAC_CHECK_FUNCS.This change fixes that problem by instead using
AC_LANG_PROGRAMto check that code using the aforementioned functions compile. This approach works for OpenSSL both before and after 3.0.