diff options
author | Matt Caswell <matt@openssl.org> | 2020-07-24 12:04:00 +0100 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2020-07-26 16:01:15 +1000 |
commit | fcdd228b012dbf74b1d52afc5d11b10809945cb3 (patch) | |
tree | 254eb689805d26fad95d8a2adb2aaf2d6118c8f7 | |
parent | 1660c8fa6be2d7c4587e490c88a44a870e9b4298 (diff) |
Fix no-dh and no-dsa
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/12525)
-rw-r--r-- | test/evp_libctx_test.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/test/evp_libctx_test.c b/test/evp_libctx_test.c index a9f665842a..395c5d99b5 100644 --- a/test/evp_libctx_test.c +++ b/test/evp_libctx_test.c @@ -23,6 +23,7 @@ #include <openssl/evp.h> #include <openssl/provider.h> #include <openssl/dsa.h> +#include <openssl/dh.h> #include <openssl/safestack.h> #include "testutil.h" #include "internal/nelem.h" @@ -57,7 +58,7 @@ const OPTIONS *test_get_options(void) return test_options; } -#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_DH) +#ifndef OPENSSL_NO_DH static const char *getname(int id) { const char *name[] = {"p", "q", "g" }; @@ -68,7 +69,11 @@ static const char *getname(int id) } #endif -#ifndef OPENSSL_NO_DSA +/* + * We're using some DH specific values in this test, so we skip compilation if + * we're in a no-dh build. + */ +#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DH) static int test_dsa_param_keygen(int tstid) { @@ -315,7 +320,7 @@ int setup_tests(void) if (!TEST_ptr(libprov)) return 0; -#ifndef OPENSSL_NO_DSA +#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_DH) ADD_ALL_TESTS(test_dsa_param_keygen, 3 * 3 * 3); #endif #ifndef OPENSSL_NO_DH |