From a466a57f1db2c153f2327d775ec49af1468735b6 Mon Sep 17 00:00:00 2001 From: Ethan Looney Date: Fri, 11 Sep 2020 14:28:10 -0600 Subject: [PATCH] Added fips check and cast variable to word32 --- tests/api.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/api.c b/tests/api.c index c4e7cc66d..f0a179d17 100644 --- a/tests/api.c +++ b/tests/api.c @@ -13668,7 +13668,8 @@ static int test_wc_SetKeyUsage (void) static int test_wc_CheckProbablePrime (void) { int ret = 0; -#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) +#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_SELFTEST) && \ + !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING) RsaKey key; WC_RNG rng; byte e[3]; @@ -13778,7 +13779,8 @@ static int test_wc_CheckProbablePrime (void) static int test_wc_RsaPSS_Verify (void) { int ret = 0; -#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) +#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_SELFTEST) && \ + !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING) RsaKey key; WC_RNG rng; int sz = 256; @@ -13804,7 +13806,7 @@ static int test_wc_RsaPSS_Verify (void) } if (ret == 0) { - ret = wc_RsaPSS_Sign((byte*)szMessage, XSTRLEN(szMessage)+1, + ret = wc_RsaPSS_Sign((byte*)szMessage, (word32)XSTRLEN(szMessage)+1, pSignature, sizeof(pSignature), WC_HASH_TYPE_SHA256, WC_MGF1SHA256, &key, &rng); if (ret > 0 ){ @@ -13866,7 +13868,8 @@ static int test_wc_RsaPSS_Verify (void) static int test_wc_RsaPSS_VerifyCheck (void) { int ret = 0; -#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) +#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_SELFTEST) && \ + !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING) RsaKey key; WC_RNG rng; int sz = 256; @@ -13960,7 +13963,8 @@ static int test_wc_RsaPSS_VerifyCheck (void) static int test_wc_RsaPSS_VerifyCheckInline (void) { int ret = 0; -#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) +#if !defined(NO_RSA) && defined(WOLFSSL_KEY_GEN) && !defined(HAVE_SELFTEST) && \ + !defined(HAVE_FIPS) && defined(WC_RSA_BLINDING) RsaKey key; WC_RNG rng; int sz = 256;