Skip to content

Rename OPENSSL_IS_X -> OPENSSL_IS_AT_LEAST_X - #13469

Merged
JosiahWI merged 1 commit into
apache:masterfrom
JosiahWI:refactor/rename-ssl3-check
Jul 31, 2026
Merged

Rename OPENSSL_IS_X -> OPENSSL_IS_AT_LEAST_X#13469
JosiahWI merged 1 commit into
apache:masterfrom
JosiahWI:refactor/rename-ssl3-check

Conversation

@JosiahWI

Copy link
Copy Markdown
Contributor

This is for consistency since there is now OpenSSL 4, and we need to add a macro definition for OpenSSL 4 as well.

This is for consistency since there is now OpenSSL 4, and we need
to add a macro definition for OpenSSL 4 as well.
@JosiahWI JosiahWI added this to the 11.0.0 milestone Jul 31, 2026
@JosiahWI JosiahWI self-assigned this Jul 31, 2026
Copilot AI review requested due to automatic review settings July 31, 2026 21:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request renames OpenSSL 3 detection macros/variables to use an “at least OpenSSL 3” naming scheme, so the build and code paths remain correct when building against newer OpenSSL major versions (e.g., OpenSSL 4).

Changes:

  • Rename the CMake variable SSLLIB_IS_OPENSSL3 to SSLLIB_IS_AT_LEAST_OPENSSL3 and update CMake conditionals accordingly.
  • Rename the preprocessor macro OPENSSL_IS_OPENSSL3 to OPENSSL_IS_AT_LEAST_OPENSSL3 across core code, plugins, examples, and tests.
  • Keep OpenSSL-3+ specific code paths (e.g., SSL_get1_peer_certificate, decoder APIs) guarded by the updated macro.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
CMakeLists.txt Renames the top-level OpenSSL 3+ build flag and the global compile definition macro.
src/tscore/CMakeLists.txt Switches HKDF source selection to the renamed “at least OpenSSL 3” CMake variable.
src/iocore/net/CMakeLists.txt Updates OpenSSL 3+ unit test inclusion guard to the renamed CMake variable.
src/iocore/net/SSLUtils.cc Updates OpenSSL 3+ include guard to the renamed macro.
src/iocore/net/SSLNetVConnection.cc Updates OpenSSL 3+ certificate API selection guard to the renamed macro.
src/iocore/net/SSLKeyUtils.h Updates OpenSSL 3+ DH key type/header selection guard to the renamed macro.
src/iocore/net/SSLKeyUtils.cc Updates OpenSSL 3+ DH generation/decoder implementation guards to the renamed macro.
src/iocore/net/SSLClientUtils.cc Updates OpenSSL 3+ certificate retrieval guard to the renamed macro.
src/iocore/net/P_SSLUtils.h Updates OpenSSL 3+ RAII/deleter type availability guards to the renamed macro.
src/iocore/net/P_SSLNetVConnection.h Updates OpenSSL 3+ certificate retrieval guard to the renamed macro.
plugins/lua/ts_lua_client_request.cc Updates OpenSSL 3+ certificate retrieval guards in Lua plugin bindings.
plugins/experimental/wasm/ats_context.cc Updates OpenSSL 3+ certificate retrieval guards in the wasm experimental plugin.
plugins/experimental/sslheaders/sslheaders.cc Updates OpenSSL 3+ certificate retrieval guards in the sslheaders experimental plugin.
plugins/experimental/access_control/unit_tests/test_utils.cc Updates OpenSSL 3+ deprecation-guarded test logic to the renamed macro.
include/cripts/Connections.hpp Updates OpenSSL 3+ certificate retrieval guard in a public header.
example/plugins/c-api/verify_cert/verify_cert.cc Updates OpenSSL 3+ certificate retrieval guard in the example plugin.

Comment thread CMakeLists.txt

@maskit maskit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this because it's just renaming. My preference is checking function availability rather than relying on version number. Availability flags work better for forks such as AWS-LC.

@JosiahWI

Copy link
Copy Markdown
Contributor Author

@maskit I agree checking function availability is better in general. I considered that first. But in this case I think we need to rely on both, because the Provider APIs exist already in OpenSSL 3, but I plan to only add support for Providers only for OpenSSL 4 and above. I think that's simpler; otherwise we have to support both the ENGINE and Provider APIs in OpenSSL 3, and that seems messy.

@JosiahWI
JosiahWI merged commit 80c01c2 into apache:master Jul 31, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to For v10.2.0 in ATS v10.2.x Jul 31, 2026
cmcfarlen pushed a commit that referenced this pull request Aug 4, 2026
This is for consistency since there is now OpenSSL 4, and we need
to add a macro definition for OpenSSL 4 as well.

(cherry picked from commit 80c01c2)
@cmcfarlen cmcfarlen moved this from For v10.2.0 to Picked v10.2.0 in ATS v10.2.x Aug 4, 2026
@cmcfarlen cmcfarlen modified the milestones: 11.0.0, 10.2.0 Aug 4, 2026
@cmcfarlen

Copy link
Copy Markdown
Contributor

Cherry-picked to the 10.2.x branch as 5633e14 for the 10.2.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Picked v10.2.0

Development

Successfully merging this pull request may close these issues.

5 participants