summaryrefslogtreecommitdiffstats
path: root/test/endecode_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r--test/endecode_test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c
index 6e67dd1835..ad76807d4f 100644
--- a/test/endecode_test.c
+++ b/test/endecode_test.c
@@ -25,6 +25,10 @@
#include "helpers/predefined_dhparams.h"
#include "testutil.h"
+#if defined(OPENSSL_NO_DH) && defined(OPENSSL_NO_DSA) && defined(OPENSSL_NO_EC)
+# define OPENSSL_NO_KEYPARAMS
+#endif
+
#ifndef OPENSSL_NO_EC
static BN_CTX *bnctx = NULL;
static OSSL_PARAM_BLD *bld_prime_nc = NULL;
@@ -40,8 +44,7 @@ static OSSL_PARAM *ec_explicit_tri_params_explicit = NULL;
# endif
#endif
-#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA) \
- || !defined(OPENSSL_NO_EC)
+#ifndef OPENSSL_NO_KEYPARAMS
static EVP_PKEY *make_template(const char *type, OSSL_PARAM *genparams)
{
EVP_PKEY *pkey = NULL;
@@ -513,8 +516,7 @@ static int test_unprotected_via_PEM(const char *type, EVP_PKEY *key)
dump_pem, 0);
}
-#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA) \
- || !defined(OPENSSL_NO_EC)
+#ifndef OPENSSL_NO_KEYPARAMS
static int check_params_DER(const char *type, const void *data, size_t data_len)
{
const unsigned char *datap = data;
@@ -569,7 +571,7 @@ static int test_params_via_PEM(const char *type, EVP_PKEY *key)
test_text, check_params_PEM,
dump_pem, 0);
}
-#endif /* ndef(OPENSSL_NO_DH) || ndef(OPENSSL_NO_DSA) || ndef(OPENSSL_NO_EC) */
+#endif /* !OPENSSL_NO_KEYPARAMS */
static int check_unprotected_legacy_PEM(const char *type,
const void *data, size_t data_len)