Fix for QAT with Shake256. Fix for XFREE missing semicolon.

This commit is contained in:
John Safranek 2020-04-21 10:38:27 -07:00
parent 7b6cc2056b
commit bf680b4a92
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
2 changed files with 6 additions and 2 deletions

View File

@ -31080,7 +31080,7 @@ static void test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS()
der = NULL;
AssertIntGT(i2d_DPP_BOOTSTRAPPING_KEY(bootstrap, &der), 0);
XFREE(der, NULL, DYNAMIC_TYPE_ASN1)
XFREE(der, NULL, DYNAMIC_TYPE_ASN1);
EVP_PKEY_free(key);
EC_KEY_free(eckey);
DPP_BOOTSTRAPPING_KEY_free(bootstrap);

View File

@ -1161,7 +1161,11 @@ int wc_InitShake256(wc_Shake* shake, void* heap, int devId)
*/
int wc_Shake256_Update(wc_Shake* shake, const byte* data, word32 len)
{
return wc_Sha3Update(shake, data, len, WC_SHA3_256_COUNT);
if (shake == NULL || (data == NULL && len > 0)) {
return BAD_FUNC_ARG;
}
return Sha3Update(shake, data, len, WC_SHA3_256_COUNT);
}
/* Calculate the SHAKE256 hash based on all the message data seen.