Remove OpenSSL ENGINE code - #13471
Open
JosiahWI wants to merge 3 commits into
Open
Conversation
Commit a966bc4 (apache#11219) accidentally disabled OpenSSL ENGINE support entirely. Although it was unintentional, it seems clear no one is using that API by this point (no one has reported it was broken), and the API is gone in recent OpenSSL versions. This patch removes the dead logic.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes remaining OpenSSL ENGINE-specific code paths from ATS’s TLS utilities and build configuration, aligning with the stated goal of dropping a deprecated/removed OpenSSL API.
Changes:
- Removed ENGINE header usage and runtime ENGINE initialization in
SSLPostConfigInitialize(). - Removed ENGINE-backed private key loading logic in
SSLPrivateKeyHandler(). - Dropped CMake feature probes for ENGINE APIs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/iocore/net/SSLUtils.cc |
Removes ENGINE-related initialization and private-key loading code in TLS setup/handling. |
CMakeLists.txt |
Removes OpenSSL ENGINE symbol checks from the build configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/iocore/net/SSLUtils.cc:775
- The log message still says "SSL engine configuration file", but this code path now just loads OpenSSL config modules via CONF_modules_load_file() (ENGINE support was removed). Keeping "engine" here is misleading for operators troubleshooting config load failures.
if (SSLConfigParams::engine_conf_file) {
OPENSSL_load_builtin_modules();
if (CONF_modules_load_file(SSLConfigParams::engine_conf_file, nullptr, 0) <= 0) {
char err_buf[256] = {0};
ERR_error_string_n(ERR_get_error(), err_buf, sizeof(err_buf));
Error("Could not load SSL engine configuration file %s: %s", SSLConfigParams::engine_conf_file, err_buf);
}
src/iocore/net/SSLUtils.cc:856
- After removing ENGINE-based key loading,
pkeyis always default-initialized to null here, soif (pkey == nullptr)is now unconditional and adds an unnecessary indentation level. This is easier to read if the conditional wrapper is removed.
// SSL_CTX_use_PrivateKey() takes its own reference on the key, so this
// reference must be released on every exit.
scoped_PKEY pkey;
if (pkey == nullptr) {
scoped_BIO bio(BIO_new_mem_buf(secret_data, secret_data_len));
maskit
approved these changes
Aug 3, 2026
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.
Commit a966bc4 (#11219) accidentally disabled OpenSSL ENGINE support entirely. Although it was unintentional, it seems clear no one is using that API by this point (no one has reported it was broken), and the API is gone in recent OpenSSL versions. This patch removes the dead logic.