From 9bdef1577baa19a066583bab1a9ebcd090b8a6c0 Mon Sep 17 00:00:00 2001 From: David Garske Date: Fri, 25 Feb 2022 15:19:52 -0800 Subject: [PATCH] Fixes for hmac. --- wolfcrypt/src/port/kcapi/kcapi_hmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/port/kcapi/kcapi_hmac.c b/wolfcrypt/src/port/kcapi/kcapi_hmac.c index 4e96839fc..41d06da0f 100644 --- a/wolfcrypt/src/port/kcapi/kcapi_hmac.c +++ b/wolfcrypt/src/port/kcapi/kcapi_hmac.c @@ -234,7 +234,7 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length) ret = wc_HmacUpdate_Software(hmac, msg, length); break; default: - ret = kcapi_md_update(hmac->handle, msg, length); + ret = (int)kcapi_md_update(hmac->handle, msg, length); if (ret >= 0) { ret = 0; } @@ -325,7 +325,7 @@ int wc_HmacFinal(Hmac* hmac, byte* hash) return wc_HmacFinal_Software(hmac, hash); #endif } - ret = kcapi_md_final(hmac->handle, hash, len); + ret = (int)kcapi_md_final(hmac->handle, hash, len); } if (ret >= 0) { ret = 0;