From: Matt Caswell Date: Tue, 12 Mar 2019 11:36:08 +0000 (+0000) Subject: Fix no-dso X-Git-Tag: openssl-3.0.0-alpha1~2379 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=80889e41a72ea2520959505537f38343958b761a;p=oweals%2Fopenssl.git Fix no-dso Don't try to load external provider modules in tests if we don't have DSO capability Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/8459) --- diff --git a/test/provider_internal_test.c b/test/provider_internal_test.c index 8ce382effa..ca554b8932 100644 --- a/test/provider_internal_test.c +++ b/test/provider_internal_test.c @@ -11,6 +11,11 @@ #include "internal/provider.h" #include "testutil.h" +#if !defined(DSO_VMS) && !defined(DSO_DLCFN) && !defined(DSO_DL) \ + && !defined(DSO_WIN32) && !defined(DSO_DLFCN) +# define OPENSSL_NO_DSO +#endif + extern OSSL_provider_init_fn PROVIDER_INIT_FUNCTION_NAME; static char buf[256]; @@ -56,7 +61,7 @@ static int test_builtin_provider(void) && test_provider(prov); } -#ifndef OPENSSL_NO_SHARED +#ifndef OPENSSL_NO_DSO static int test_loaded_provider(void) { const char *name = "p_test"; @@ -71,7 +76,7 @@ static int test_loaded_provider(void) int setup_tests(void) { ADD_TEST(test_builtin_provider); -#ifndef OPENSSL_NO_SHARED +#ifndef OPENSSL_NO_DSO ADD_TEST(test_loaded_provider); #endif return 1; diff --git a/test/provider_test.c b/test/provider_test.c index 250eea39ec..eefafcf5d5 100644 --- a/test/provider_test.c +++ b/test/provider_test.c @@ -11,6 +11,12 @@ #include #include "testutil.h" +#if !defined(DSO_VMS) && !defined(DSO_DLCFN) && !defined(DSO_DL) \ + && !defined(DSO_WIN32) && !defined(DSO_DLFCN) +# define OPENSSL_NO_DSO +#endif + + extern OSSL_provider_init_fn PROVIDER_INIT_FUNCTION_NAME; static char buf[256]; @@ -45,11 +51,11 @@ static int test_builtin_provider(void) return TEST_true(OSSL_PROVIDER_add_builtin(NULL, name, - PROVIDER_INIT_FUNCTION_NAME)) + PROVIDER_INIT_FUNCTION_NAME)) && test_provider(name); } -#ifndef OPENSSL_NO_SHARED +#ifndef OPENSSL_NO_DSO static int test_loaded_provider(void) { const char *name = "p_test"; @@ -61,7 +67,7 @@ static int test_loaded_provider(void) int setup_tests(void) { ADD_TEST(test_builtin_provider); -#ifndef OPENSSL_NO_SHARED +#ifndef OPENSSL_NO_DSO ADD_TEST(test_loaded_provider); #endif return 1;