Skip to content

Commit 59c7abf

Browse files
authored
Merge pull request #7675 from douzzer/20240622-SHA3-CRYPTO_CB
20240622-SHA3-CRYPTO_CB
2 parents 0cf5421 + b4e15d0 commit 59c7abf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

wolfcrypt/src/cryptocb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ int wc_CryptoCb_Sha512Hash(wc_Sha512* sha512, const byte* in,
16061606
}
16071607
#endif /* WOLFSSL_SHA512 */
16081608

1609-
#ifdef WOLFSSL_SHA3
1609+
#if defined(WOLFSSL_SHA3) && (!defined(HAVE_FIPS) || FIPS_VERSION_GE(6, 0))
16101610
int wc_CryptoCb_Sha3Hash(wc_Sha3* sha3, int type, const byte* in,
16111611
word32 inSz, byte* digest)
16121612
{
@@ -1638,7 +1638,7 @@ int wc_CryptoCb_Sha3Hash(wc_Sha3* sha3, int type, const byte* in,
16381638

16391639
return wc_CryptoCb_TranslateErrorCode(ret);
16401640
}
1641-
#endif /* WOLFSSL_SHA3 */
1641+
#endif /* WOLFSSL_SHA3 && (!HAVE_FIPS || FIPS_VERSION_GE(6, 0)) */
16421642

16431643
#ifndef NO_HMAC
16441644
int wc_CryptoCb_Hmac(Hmac* hmac, int macType, const byte* in, word32 inSz,

wolfcrypt/test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54802,7 +54802,7 @@ static int myCryptoDevCb(int devIdArg, wc_CryptoInfo* info, void* ctx)
5480254802
}
5480354803
else
5480454804
#endif
54805-
#ifdef WOLFSSL_SHA3
54805+
#if defined(WOLFSSL_SHA3) && (!defined(HAVE_FIPS) || FIPS_VERSION_GE(6, 0))
5480654806
if (info->hash.type == WC_HASH_TYPE_SHA3_224) {
5480754807
if (info->hash.sha3 == NULL)
5480854808
return NOT_COMPILED_IN;

0 commit comments

Comments
 (0)