Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,22 @@ check_symbol_exists(MD5_Init "openssl/md5.h" HAVE_MD5_INIT)
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_source_compiles(
C
"#include <openssl/engine.h>
#if defined(OPENSSL_NO_ENGINE) || defined(OPENSSL_NO_DYNAMIC_ENGINE)
#error OpenSSL dynamic engine support unavailable
#endif
int main(void) {
ENGINE_load_dynamic();
ENGINE *engine = ENGINE_new();
if (engine) {
ENGINE_free(engine);
}
return 0;
}"
HAVE_OPENSSL_DYNAMIC_ENGINE
)
check_symbol_exists(sysctlbyname "sys/sysctl.h" HAVE_SYSCTLBYNAME)

if(SSLLIB_IS_OPENSSL3)
Expand Down
5 changes: 4 additions & 1 deletion tests/gold_tests/tls/tls_engine.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@
Test tls via the async interface with the sample async_engine
'''

async_engine = os.path.join(Test.Variables.AtsTestPluginsDir, 'async_engine.so')

Test.SkipUnless(
Condition.HasOpenSSLVersion('1.1.1'),
Condition.IsOpenSSL(),
Condition(lambda: os.path.isfile(async_engine), async_engine + " not found."),
)

# Define default ATS
ts = Test.MakeATSProcess("ts", enable_tls=True)
server = Test.MakeOriginServer("server")

ts.Setup.Copy(os.path.join(Test.Variables.AtsTestPluginsDir, 'async_engine.so'), Test.RunDirectory)
ts.Setup.Copy(async_engine, Test.RunDirectory)

# Add info the origin server responses
server.addResponse(
Expand Down
6 changes: 4 additions & 2 deletions tests/tools/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ target_link_libraries(test_cppapi PRIVATE ts::tscppapi)
add_autest_plugin(test_hooks test_hooks.cc)
add_autest_plugin(test_log_interface test_log_interface.cc)
add_autest_plugin(user_args user_args.cc)
add_autest_plugin(async_engine async_engine.c)
add_autest_plugin(hook_tunnel_plugin hook_tunnel_plugin.cc)
add_autest_plugin(tunnel_transform tunnel_transform.cc)
add_autest_plugin(http2_close_connection http2_close_connection.cc)
Expand All @@ -44,4 +43,7 @@ target_link_libraries(ssl_client_verify_test PRIVATE OpenSSL::SSL)
target_link_libraries(ssl_hook_test PRIVATE OpenSSL::SSL)
target_link_libraries(ssl_secret_load_test PRIVATE OpenSSL::SSL)
target_link_libraries(ssl_verify_test PRIVATE OpenSSL::SSL)
target_link_libraries(async_engine PRIVATE OpenSSL::SSL)
if(TS_USE_TLS_ASYNC AND HAVE_OPENSSL_DYNAMIC_ENGINE)
add_autest_plugin(async_engine async_engine.c)
target_link_libraries(async_engine PRIVATE OpenSSL::SSL)
endif()