Fix for SHA-3 runtime detection for not supported in hardware using NOT_COMPILED_IN.

This commit is contained in:
David Garske
2019-03-22 06:52:36 -07:00
parent d7c6683d9b
commit 5b21da4dc5

View File

@ -706,7 +706,7 @@ static int wc_Sha3Update(wc_Sha3* sha3, const byte* data, word32 len, byte p)
/* QAT only supports SHA3_256 */
if (p == WC_SHA3_256_COUNT) {
ret = IntelQaSymSha3(&sha3->asyncDev, NULL, data, len);
if (ret != CRYPTOCB_UNAVAILABLE)
if (ret != NOT_COMPILED_IN)
return ret;
/* fall-through when unavailable */
}
@ -742,7 +742,7 @@ static int wc_Sha3Final(wc_Sha3* sha3, byte* hash, byte p, byte len)
/* QAT SHA-3 only supported on v2 (8970 or later cards) */
if (len == WC_SHA3_256_DIGEST_SIZE) {
ret = IntelQaSymSha3(&sha3->asyncDev, hash, NULL, len);
if (ret != CRYPTOCB_UNAVAILABLE)
if (ret != NOT_COMPILED_IN)
return ret;
/* fall-through when unavailable */
}