diff options
author | Richard Levitte <levitte@openssl.org> | 2020-12-17 21:37:15 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2020-12-20 12:19:42 +0100 |
commit | 3a1ee3c1993c588a22cb80f1d0eb6237f83a1560 (patch) | |
tree | 3e915497790f85855ef9730b2d36bc97a688a9f4 /test | |
parent | e3577adddf6bc4f0d9d202621a2c576d982d6f0a (diff) |
Drop OPENSSL_NO_RSA everywhere
The configuration option 'no-rsa' was dropped with OpenSSL 1.1.0, so
this is simply a cleanup of the remains.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13700)
Diffstat (limited to 'test')
-rw-r--r-- | test/acvp_test.c | 10 | ||||
-rw-r--r-- | test/acvp_test.inc | 3 | ||||
-rw-r--r-- | test/evp_test.c | 4 | ||||
-rw-r--r-- | test/rsa_mp_test.c | 8 | ||||
-rw-r--r-- | test/rsa_sp800_56b_test.c | 12 | ||||
-rw-r--r-- | test/rsa_test.c | 12 | ||||
-rw-r--r-- | test/ssl_old_test.c | 4 |
7 files changed, 7 insertions, 46 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c index 5c4a38749f..3d4214c784 100644 --- a/test/acvp_test.c +++ b/test/acvp_test.c @@ -58,8 +58,6 @@ const OPTIONS *test_get_options(void) return test_options; } -#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DSA) \ - || !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA) static int pkey_get_bn_bytes(EVP_PKEY *pkey, const char *name, unsigned char **out, size_t *out_len) { @@ -85,10 +83,7 @@ err: BN_free(bn); return 0; } -#endif -#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DSA) \ - || !defined(OPENSSL_NO_RSA) static int sig_gen(EVP_PKEY *pkey, OSSL_PARAM *params, const char *digest_name, const unsigned char *msg, size_t msg_len, unsigned char **sig_out, size_t *sig_out_len) @@ -114,7 +109,6 @@ err: EVP_MD_CTX_free(md_ctx); return ret; } -#endif #ifndef OPENSSL_NO_EC static int ecdsa_keygen_test(int id) @@ -1010,7 +1004,6 @@ err: #endif /* OPENSSL_NO_DH */ -#ifndef OPENSSL_NO_RSA static EVP_PKEY *rsa_keygen(int bits) { EVP_PKEY *key = NULL; @@ -1302,7 +1295,6 @@ err: BN_CTX_free(bn_ctx); return ret; } -#endif /* OPENSSL_NO_RSA */ static int self_test_events(const OSSL_PARAM params[], void *varg) { @@ -1443,13 +1435,11 @@ int setup_tests(void) ADD_ALL_TESTS(aes_ccm_enc_dec_test, OSSL_NELEM(aes_ccm_enc_data)); ADD_ALL_TESTS(aes_gcm_enc_dec_test, OSSL_NELEM(aes_gcm_enc_data)); -#ifndef OPENSSL_NO_RSA ADD_ALL_TESTS(rsa_keygen_test, OSSL_NELEM(rsa_keygen_data)); ADD_ALL_TESTS(rsa_siggen_test, OSSL_NELEM(rsa_siggen_data)); ADD_ALL_TESTS(rsa_sigver_test, OSSL_NELEM(rsa_sigver_data)); ADD_ALL_TESTS(rsa_decryption_primitive_test, OSSL_NELEM(rsa_decrypt_prim_data)); -#endif /* OPENSSL_NO_RSA */ #ifndef OPENSSL_NO_DH ADD_ALL_TESTS(dh_safe_prime_keygen_test, diff --git a/test/acvp_test.inc b/test/acvp_test.inc index eea66c0802..ad11d3ae1e 100644 --- a/test/acvp_test.inc +++ b/test/acvp_test.inc @@ -1010,7 +1010,6 @@ static const struct dh_safe_prime_keyver_st dh_safe_prime_keyver_data[] = { #endif /* OPENSSL_NO_DH */ -#ifndef OPENSSL_NO_RSA struct rsa_keygen_st { size_t mod; const unsigned char *e; @@ -1981,8 +1980,6 @@ static const struct rsa_decrypt_prim_st rsa_decrypt_prim_data[] = { }, }; -#endif /* OPENSSL_NO_RSA */ - struct drbg_st { const char *drbg_name; const char *cipher; diff --git a/test/evp_test.c b/test/evp_test.c index cc579ff310..fecbd9e09d 100644 --- a/test/evp_test.c +++ b/test/evp_test.c @@ -3654,10 +3654,6 @@ static int is_digest_disabled(const char *name) static int is_pkey_disabled(const char *name) { -#ifdef OPENSSL_NO_RSA - if (STR_STARTS_WITH(name, "RSA")) - return 1; -#endif #ifdef OPENSSL_NO_EC if (STR_STARTS_WITH(name, "EC")) return 1; diff --git a/test/rsa_mp_test.c b/test/rsa_mp_test.c index 0f3db5d4da..5405df3424 100644 --- a/test/rsa_mp_test.c +++ b/test/rsa_mp_test.c @@ -26,9 +26,8 @@ #include "testutil.h" -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -# include "crypto/rsa.h" +#include <openssl/rsa.h> +#include "crypto/rsa.h" #define NUM_EXTRA_PRIMES 1 @@ -289,12 +288,9 @@ err: RSA_free(key); return ret; } -#endif int setup_tests(void) { -#ifndef OPENSSL_NO_RSA ADD_ALL_TESTS(test_rsa_mp, 2); -#endif return 1; } diff --git a/test/rsa_sp800_56b_test.c b/test/rsa_sp800_56b_test.c index 94369ce701..033983d58e 100644 --- a/test/rsa_sp800_56b_test.c +++ b/test/rsa_sp800_56b_test.c @@ -25,15 +25,8 @@ #include "testutil.h" -#ifdef OPENSSL_NO_RSA -int setup_tests(void) -{ - /* No tests */ - return 1; -} -#else -# include "rsa_local.h" -# include <openssl/rsa.h> +#include "rsa_local.h" +#include <openssl/rsa.h> /* taken from RSA2 cavs data */ static const unsigned char cav_e[] = { @@ -550,4 +543,3 @@ int setup_tests(void) ADD_ALL_TESTS(test_sp80056b_keygen, (int)OSSL_NELEM(keygen_size)); return 1; } -#endif diff --git a/test/rsa_test.c b/test/rsa_test.c index 5e7529876a..6badbc7076 100644 --- a/test/rsa_test.c +++ b/test/rsa_test.c @@ -27,16 +27,9 @@ #include "testutil.h" -#ifdef OPENSSL_NO_RSA -int setup_tests(void) -{ - /* No tests */ - return 1; -} -#else -# include <openssl/rsa.h> +#include <openssl/rsa.h> -# define SetKey \ +#define SetKey \ RSA_set0_key(key, \ BN_bin2bn(n, sizeof(n)-1, NULL), \ BN_bin2bn(e, sizeof(e)-1, NULL), \ @@ -436,4 +429,3 @@ int setup_tests(void) ADD_ALL_TESTS(test_rsa_security_bit, OSSL_NELEM(rsa_security_bits_cases)); return 1; } -#endif diff --git a/test/ssl_old_test.c b/test/ssl_old_test.c index f63aa58b12..4114d94917 100644 --- a/test/ssl_old_test.c +++ b/test/ssl_old_test.c @@ -46,9 +46,7 @@ #include <openssl/ssl.h> #include <openssl/err.h> #include <openssl/rand.h> -#ifndef OPENSSL_NO_RSA -# include <openssl/rsa.h> -#endif +#include <openssl/rsa.h> #ifndef OPENSSL_NO_DSA # include <openssl/dsa.h> #endif |