diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-11-29 20:33:23 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-12-04 16:20:53 +0100 |
commit | 821d6f8c679434ddbb2827045b6e3c66ce10da29 (patch) | |
tree | 08e0e6f75e4b2e74d1531437273aab6c2e37eea2 /test/endecode_test.c | |
parent | apps/speed.c: Fix build errors on OPENSSL_NO_{RSA,DSA,EC,DEPECATED_3_0} (diff) | |
download | openssl-821d6f8c679434ddbb2827045b6e3c66ce10da29.tar.xz openssl-821d6f8c679434ddbb2827045b6e3c66ce10da29.zip |
endecode_test.c: Fix build errors on OPENSSL_NO_{DH,DSA,EC,EC2M}
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13110)
Diffstat (limited to 'test/endecode_test.c')
-rw-r--r-- | test/endecode_test.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/endecode_test.c b/test/endecode_test.c index f72f9aaac8..76b32a8aa9 100644 --- a/test/endecode_test.c +++ b/test/endecode_test.c @@ -40,12 +40,14 @@ static OSSL_PARAM *ec_explicit_tri_params_explicit = NULL; # endif #endif +#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_DSA) \ + || !defined(OPENSSL_NO_EC) static EVP_PKEY *make_template(const char *type, OSSL_PARAM *genparams) { EVP_PKEY *pkey = NULL; EVP_PKEY_CTX *ctx = NULL; -#ifndef OPENSSL_NO_DH +# ifndef OPENSSL_NO_DH /* * Use 512-bit DH(X) keys with predetermined parameters for efficiency, * for testing only. Use a minimum key size of 2048 for security purposes. @@ -54,7 +56,7 @@ static EVP_PKEY *make_template(const char *type, OSSL_PARAM *genparams) return get_dh512(NULL); if (strcmp(type, "X9.42 DH") == 0) return get_dhx512(NULL); -#endif +# endif /* * No real need to check the errors other than for the cascade @@ -69,6 +71,7 @@ static EVP_PKEY *make_template(const char *type, OSSL_PARAM *genparams) return pkey; } +#endif static EVP_PKEY *make_key(const char *type, EVP_PKEY *template, OSSL_PARAM *genparams) @@ -514,6 +517,8 @@ 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) static int check_params_DER(const char *type, const void *data, size_t data_len) { const unsigned char *datap = data; @@ -568,6 +573,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) */ static int check_unprotected_legacy_PEM(const char *type, const void *data, size_t data_len) |