Improve wc_HmacUpdate to return early if input length == 0. Fixes QAT issue with HKDF test.

This commit is contained in:
David Garske
2025-11-14 09:40:56 -08:00
parent 50c5028c5a
commit 4e1b719236

View File

@@ -814,6 +814,9 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length)
if (hmac == NULL || (msg == NULL && length > 0)) {
return BAD_FUNC_ARG;
}
if (length == 0) {
return 0; /* nothing to do, return success */
}
#ifdef WOLF_CRYPTO_CB
if (hmac->devId != INVALID_DEVID) {