summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-12-06 10:52:47 +0100
committerPauli <pauli@openssl.org>2023-01-31 11:04:45 +1100
commitf006e27ff02cd2303a2520ef73c53470490edbc3 (patch)
tree8ded0f01bf12edfd7b7f464bd90280958ad929dc
parentb4120a155bad48fcac0ea5abe65a08eddfe9a4eb (diff)
Workaround crash in atexit on NonStop platforms
We cannot dynamically load the legacy provider into an application that is linked statically to libcrypto as this causes a double loading of libcrypto (one static and one dynamic) and on NonStop this leads to a segfault in atexit(). Fixes #17537 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19844) (cherry picked from commit 8bb55680e46c868b0aa09682c2bef954231841b5)
-rw-r--r--test/evp_extra_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index 2ab9bd6a4b..039803037a 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -4731,7 +4731,9 @@ int setup_tests(void)
/* Swap the libctx to test non-default context only */
nullprov = OSSL_PROVIDER_load(NULL, "null");
deflprov = OSSL_PROVIDER_load(testctx, "default");
+#ifndef OPENSSL_SYS_TANDEM
lgcyprov = OSSL_PROVIDER_load(testctx, "legacy");
+#endif
break;
case OPT_TEST_CASES:
break;
@@ -4863,6 +4865,8 @@ void cleanup_tests(void)
{
OSSL_PROVIDER_unload(nullprov);
OSSL_PROVIDER_unload(deflprov);
+#ifndef OPENSSL_SYS_TANDEM
OSSL_PROVIDER_unload(lgcyprov);
+#endif
OSSL_LIB_CTX_free(testctx);
}