Fix pre-processor checks in wolfCrypt test for unique configuration

This commit is contained in:
kaleb-himes
2018-11-02 15:22:11 -06:00
parent 1ffc1108a6
commit 92d6dc36af

View File

@ -6995,7 +6995,7 @@ int aesgcm_test(void)
return -5709; return -5709;
#endif /* HAVE_AES_DECRYPT */ #endif /* HAVE_AES_DECRYPT */
#endif /* BENCH_AESGCM_LARGE */ #endif /* BENCH_AESGCM_LARGE */
#ifdef ENABLE_NON_12BYTE_IV_TEST #if defined(ENABLE_NON_12BYTE_IV_TEST) && defined(WOLFSSL_AES_256)
/* Variable IV length test */ /* Variable IV length test */
for (ivlen=0; ivlen<(int)sizeof(k1); ivlen++) { for (ivlen=0; ivlen<(int)sizeof(k1); ivlen++) {
/* AES-GCM encrypt and decrypt both use AES encrypt internally */ /* AES-GCM encrypt and decrypt both use AES encrypt internally */
@ -7188,7 +7188,7 @@ int aesgcm_test(void)
#if !defined(HAVE_FIPS) || \ #if !defined(HAVE_FIPS) || \
(defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2)) (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION >= 2))
/* Test encrypt with internally generated IV */ /* Test encrypt with internally generated IV */
#if !(defined(WC_NO_RNG) || defined(HAVE_SELFTEST)) #if defined(WOLFSSL_AES_256) && !(defined(WC_NO_RNG) || defined(HAVE_SELFTEST))
{ {
WC_RNG rng; WC_RNG rng;
byte randIV[12]; byte randIV[12];
@ -9383,7 +9383,12 @@ static int rsa_decode_test(RsaKey* keyPub)
inOutIdx = 2; inOutIdx = 2;
inSz = sizeof(goodAlgId); inSz = sizeof(goodAlgId);
ret = wc_RsaPublicKeyDecode(goodAlgId, &inOutIdx, keyPub, inSz); ret = wc_RsaPublicKeyDecode(goodAlgId, &inOutIdx, keyPub, inSz);
if (ret != ASN_PARSE_E) { #ifndef WOLFSSL_NO_DECODE_EXTRA
if (ret != ASN_PARSE_E)
#else
if (ret != ASN_RSA_KEY_E)
#endif
{
ret = -6797; ret = -6797;
goto done; goto done;
} }