This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new d1ea8581d1 Fix: Build with OpenSSL 3.5+ which removed engine API 
(#12902)
d1ea8581d1 is described below

commit d1ea8581d1af62ddf3c8b56e9c544a25ec5210c7
Author: Bryan Call <[email protected]>
AuthorDate: Fri Feb 20 16:17:44 2026 -0800

    Fix: Build with OpenSSL 3.5+ which removed engine API (#12902)
    
    * Guard engine.h include with HAVE_ENGINE_LOAD_DYNAMIC -- OpenSSL 3.5
      removed the header entirely; only include it when cmake detected the
      ENGINE API is available.
    * Fix check_symbol_exists header path from "include/openssl/engine.h"
      to "openssl/engine.h" for consistency with all other OpenSSL checks.
---
 CMakeLists.txt             | 6 +++---
 src/iocore/net/SSLUtils.cc | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e6b59f271..df6c433742 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -545,9 +545,9 @@ check_symbol_exists(SSL_get_all_async_fds openssl/ssl.h 
TS_USE_TLS_ASYNC)
 check_symbol_exists(OSSL_PARAM_construct_end "openssl/params.h" 
HAVE_OSSL_PARAM_CONSTRUCT_END)
 check_symbol_exists(TLS1_3_VERSION "openssl/ssl.h" TS_USE_TLS13)
 check_symbol_exists(MD5_Init "openssl/md5.h" HAVE_MD5_INIT)
-check_symbol_exists(ENGINE_load_dynamic "include/openssl/engine.h" 
HAVE_ENGINE_LOAD_DYNAMIC)
-check_symbol_exists(ENGINE_get_default_RSA "include/openssl/engine.h" 
HAVE_ENGINE_GET_DEFAULT_RSA)
-check_symbol_exists(ENGINE_load_private_key "include/openssl/engine.h" 
HAVE_ENGINE_LOAD_PRIVATE_KEY)
+check_symbol_exists(ENGINE_load_dynamic "openssl/engine.h" 
HAVE_ENGINE_LOAD_DYNAMIC)
+check_symbol_exists(ENGINE_get_default_RSA "openssl/engine.h" 
HAVE_ENGINE_GET_DEFAULT_RSA)
+check_symbol_exists(ENGINE_load_private_key "openssl/engine.h" 
HAVE_ENGINE_LOAD_PRIVATE_KEY)
 check_symbol_exists(sysctlbyname "sys/sysctl.h" HAVE_SYSCTLBYNAME)
 
 if(SSLLIB_IS_OPENSSL3)
diff --git a/src/iocore/net/SSLUtils.cc b/src/iocore/net/SSLUtils.cc
index 0b7bc982ad..6d262c1ca6 100644
--- a/src/iocore/net/SSLUtils.cc
+++ b/src/iocore/net/SSLUtils.cc
@@ -54,7 +54,9 @@
 #include <openssl/conf.h>
 #include <openssl/dh.h>
 #include <openssl/ec.h>
+#if HAVE_ENGINE_LOAD_DYNAMIC
 #include <openssl/engine.h>
+#endif
 #include <openssl/err.h>
 #include <openssl/evp.h>
 #include <openssl/objects.h>

Reply via email to