Skip to content

Conversation

@midchildan
Copy link
Contributor

The configure script fails to detect OCSP support when building ATS with OpenSSL 3.0.

This isn't a problem in the master branch, 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:

  • Alpine
  • Debian 12
  • Fedora 37
  • Homebrew
  • Nixpkgs

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_header and OCSP_REQ_CTX_set1_req, by attempting to link to them using AC_CHECK_FUNCS. In OpenSSL 3.0, these functions were turned into macros making them uneligible for detection with AC_CHECK_FUNCS.

This change fixes that problem by instead using AC_LANG_PROGRAM to check that code using the aforementioned functions compile. This approach works for OpenSSL both before and after 3.0.

The configure script fails to detect OCSP support when building ATS with
OpenSSL 3.0.

This isn't a problem in the `master` branch, which copied OpenSSL's OCSP code
into ATS itself in apache#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:

- Alpine
- Debian 12
- Fedora 37
- Homebrew
- Nixpkgs

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_header` and `OCSP_REQ_CTX_set1_req`, by attempting to link to
them using `AC_CHECK_FUNCS`. In OpenSSL 3.0, these functions were turned into
macros making them uneligible for detection with `AC_CHECK_FUNCS`.

This change fixes that problem by instead using `AC_LANG_PROGRAM` to check that
code using the aforementioned functions compile. This approach works for OpenSSL
both before and after 3.0.
@midchildan midchildan requested a review from bryancall as a code owner May 28, 2023 16:28
@midchildan midchildan changed the title Fix OCSP detection during build Fix OCSP detection during build (9.2.x) May 28, 2023
@bryancall bryancall added the TLS label Jun 2, 2023
@bryancall bryancall modified the milestones: 10.0.0, 9.2.1 Jun 2, 2023
@bryancall bryancall modified the milestones: 9.2.1, 9.2.2 Jun 7, 2023
@bryancall bryancall merged commit e079d20 into apache:9.2.x Jun 26, 2023
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.

3 participants