forked from wolfSSL/wolfssl
Fixes from review
Remove ForceZero changes (better version in another pull request) Remove SHA-224 APIs for FIPS (algorithm not avaialable in FIPS.
This commit is contained in:
@ -183,18 +183,9 @@ STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count)
|
||||
/* Make sure compiler doesn't skip */
|
||||
STATIC INLINE void ForceZero(const void* mem, word32 len)
|
||||
{
|
||||
#ifdef WOLFCRYPT_FORCEZERO_BYTE
|
||||
volatile byte* z = (volatile byte*)mem;
|
||||
|
||||
while (len--) *z++ = 0;
|
||||
#else
|
||||
volatile word64 *z = (volatile word64 *)mem;
|
||||
volatile byte *b;
|
||||
|
||||
while (len >= sizeof(word64)) { *z++ = 0; len -= sizeof(word64); }
|
||||
b = (volatile byte *)z;
|
||||
while (len--) *b++ = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,27 +49,6 @@ int wc_Sha256Final(Sha256* sha, byte* out)
|
||||
return Sha256Final_fips(sha, out);
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_SHA224)
|
||||
|
||||
int wc_InitSha224(Sha224* sha)
|
||||
{
|
||||
return InitSha224_fips(sha);
|
||||
}
|
||||
|
||||
|
||||
int wc_Sha224Update(Sha224* sha, const byte* data, word32 len)
|
||||
{
|
||||
return Sha224Update_fips(sha, data, len);
|
||||
}
|
||||
|
||||
|
||||
int wc_Sha224Final(Sha224* sha, byte* out)
|
||||
{
|
||||
return Sha224Final_fips(sha, out);
|
||||
}
|
||||
|
||||
|
||||
#endif /* WOLFSSL_SHA224 */
|
||||
#else /* else build without fips */
|
||||
|
||||
#if !defined(NO_SHA256) && defined(WOLFSSL_TI_HASH)
|
||||
|
Reference in New Issue
Block a user