forked from wolfSSL/wolfssl
Added fips check and cast variable to word32
This commit is contained in:
14
tests/api.c
14
tests/api.c
@ -13668,7 +13668,8 @@ static int test_wc_SetKeyUsage (void)
|
|||||||
static int test_wc_CheckProbablePrime (void)
|
static int test_wc_CheckProbablePrime (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
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;
|
RsaKey key;
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
byte e[3];
|
byte e[3];
|
||||||
@ -13778,7 +13779,8 @@ static int test_wc_CheckProbablePrime (void)
|
|||||||
static int test_wc_RsaPSS_Verify (void)
|
static int test_wc_RsaPSS_Verify (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
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;
|
RsaKey key;
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
int sz = 256;
|
int sz = 256;
|
||||||
@ -13804,7 +13806,7 @@ static int test_wc_RsaPSS_Verify (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == 0) {
|
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),
|
pSignature, sizeof(pSignature),
|
||||||
WC_HASH_TYPE_SHA256, WC_MGF1SHA256, &key, &rng);
|
WC_HASH_TYPE_SHA256, WC_MGF1SHA256, &key, &rng);
|
||||||
if (ret > 0 ){
|
if (ret > 0 ){
|
||||||
@ -13866,7 +13868,8 @@ static int test_wc_RsaPSS_Verify (void)
|
|||||||
static int test_wc_RsaPSS_VerifyCheck (void)
|
static int test_wc_RsaPSS_VerifyCheck (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
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;
|
RsaKey key;
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
int sz = 256;
|
int sz = 256;
|
||||||
@ -13960,7 +13963,8 @@ static int test_wc_RsaPSS_VerifyCheck (void)
|
|||||||
static int test_wc_RsaPSS_VerifyCheckInline (void)
|
static int test_wc_RsaPSS_VerifyCheckInline (void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
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;
|
RsaKey key;
|
||||||
WC_RNG rng;
|
WC_RNG rng;
|
||||||
int sz = 256;
|
int sz = 256;
|
||||||
|
Reference in New Issue
Block a user