Added fips check and cast variable to word32

This commit is contained in:
Ethan Looney
2020-09-11 14:28:10 -06:00
parent 7dce2e7f2c
commit a466a57f1d

View File

@ -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;