mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
@@ -11341,7 +11341,7 @@ static int test_wc_RsaPublicKeyDecodeRaw (void)
|
|||||||
/* 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. */
|
||||||
#ifdef WOLFSSL_FIPS
|
#ifdef HAVE_FIPS
|
||||||
static int MakeRsaKeyRetry(RsaKey* key, int size, long e, WC_RNG* rng)
|
static int MakeRsaKeyRetry(RsaKey* key, int size, long e, WC_RNG* rng)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -20664,6 +20664,10 @@ static void test_wolfSSL_PKCS8_Compat(void)
|
|||||||
|
|
||||||
static void test_wolfSSL_PKCS8_d2i(void)
|
static void test_wolfSSL_PKCS8_d2i(void)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_FIPS
|
||||||
|
/* This test ends up using HMAC as a part of PBKDF2, and HMAC
|
||||||
|
* requires a 12 byte password in FIPS mode. This test ends up
|
||||||
|
* trying to use an 8 byte password. */
|
||||||
#ifdef OPENSSL_ALL
|
#ifdef OPENSSL_ALL
|
||||||
WOLFSSL_EVP_PKEY* pkey = NULL;
|
WOLFSSL_EVP_PKEY* pkey = NULL;
|
||||||
#ifndef NO_FILESYSTEM
|
#ifndef NO_FILESYSTEM
|
||||||
@@ -20817,6 +20821,7 @@ static void test_wolfSSL_PKCS8_d2i(void)
|
|||||||
|
|
||||||
printf(resultFmt, passed);
|
printf(resultFmt, passed);
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* HAVE_FIPS */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_wolfSSL_ERR_put_error(void)
|
static void test_wolfSSL_ERR_put_error(void)
|
||||||
|
@@ -1628,7 +1628,8 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* if input and output same will overwrite input iv */
|
/* if input and output same will overwrite input iv */
|
||||||
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
if ((const byte*)aes->tmp != inBlock)
|
||||||
|
XMEMCPY(aes->tmp, inBlock, AES_BLOCK_SIZE);
|
||||||
AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key,
|
AES_ECB_decrypt(inBlock, outBlock, AES_BLOCK_SIZE, (byte*)aes->key,
|
||||||
aes->rounds);
|
aes->rounds);
|
||||||
return;
|
return;
|
||||||
|
@@ -3654,7 +3654,7 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
|
|||||||
if (err == MP_OKAY)
|
if (err == MP_OKAY)
|
||||||
err = _CheckProbablePrime(&p, NULL, &tmp3, size, &isPrime, rng);
|
err = _CheckProbablePrime(&p, NULL, &tmp3, size, &isPrime, rng);
|
||||||
|
|
||||||
#ifdef WOLFSSL_FIPS
|
#ifdef HAVE_FIPS
|
||||||
i++;
|
i++;
|
||||||
#else
|
#else
|
||||||
/* Keep the old retry behavior in non-FIPS build. */
|
/* Keep the old retry behavior in non-FIPS build. */
|
||||||
@@ -3689,7 +3689,7 @@ int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng)
|
|||||||
if (err == MP_OKAY)
|
if (err == MP_OKAY)
|
||||||
err = _CheckProbablePrime(&p, &q, &tmp3, size, &isPrime, rng);
|
err = _CheckProbablePrime(&p, &q, &tmp3, size, &isPrime, rng);
|
||||||
|
|
||||||
#ifdef WOLFSSL_FIPS
|
#ifdef HAVE_FIPS
|
||||||
i++;
|
i++;
|
||||||
#else
|
#else
|
||||||
/* Keep the old retry behavior in non-FIPS build. */
|
/* Keep the old retry behavior in non-FIPS build. */
|
||||||
|
Reference in New Issue
Block a user