Eliminate d2i_RSAPublicKey test when HAVE_FAST_RSA is enabled

This commit is contained in:
Takashi Kojo
2018-05-17 06:26:49 +09:00
parent 98ef7f43e1
commit 4efe8740ad

View File

@@ -9516,7 +9516,8 @@ static int test_wc_RsaPublicKeyDecodeRaw (void)
} /* END test_wc_RsaPublicKeyDecodeRaw */ } /* END test_wc_RsaPublicKeyDecodeRaw */
#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) #if (!defined(NO_RSA) || !defined(HAVE_FAST_RSA)) && (defined(WOLFSSL_KEY_GEN) || \
defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
/* In FIPS builds, wc_MakeRsaKey() will return an error if it cannot find /* In FIPS builds, wc_MakeRsaKey() will return an error if it cannot find
* a probable prime in 5*(modLen/2) attempts. In non-FIPS builds, it keeps * a probable prime in 5*(modLen/2) attempts. In non-FIPS builds, it keeps
* trying until it gets a probable prime. */ * trying until it gets a probable prime. */
@@ -9854,8 +9855,7 @@ static int test_wc_RsaKeyToDer (void)
static int test_wc_RsaKeyToPublicDer (void) static int test_wc_RsaKeyToPublicDer (void)
{ {
int ret = 0; int ret = 0;
#if (!defined(NO_RSA) || !defined(HAVE_FAST_RSA)) && defined(WOLFSSL_KEY_GEN) && \ #if (!defined(NO_RSA) || !defined(HAVE_FAST_RSA)) && defined(WOLFSSL_KEY_GEN)
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
RsaKey key; RsaKey key;
WC_RNG rng; WC_RNG rng;
byte* der; byte* der;
@@ -17379,7 +17379,7 @@ static void test_wolfSSL_RSA(void)
static void test_wolfSSL_RSA_DER(void) static void test_wolfSSL_RSA_DER(void)
{ {
#if defined(OPENSSL_EXTRA) && !defined(NO_RSA) #if defined(OPENSSL_EXTRA) && !defined(NO_RSA) && !defined(HAVE_FAST_RSA)
RSA *rsa; RSA *rsa;
int i; int i;