forked from wolfSSL/wolfssl
Hmac unit test functions ready for PR.
This commit is contained in:
1063
tests/api.c
1063
tests/api.c
File diff suppressed because it is too large
Load Diff
@ -510,6 +510,10 @@ int wc_HmacUpdate(Hmac* hmac, const byte* msg, word32 length)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (hmac == NULL || msg == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
|
||||
if (hmac->asyncDev.marker == WOLFSSL_ASYNC_MARKER_HMAC) {
|
||||
#if defined(HAVE_CAVIUM)
|
||||
@ -581,6 +585,10 @@ int wc_HmacFinal(Hmac* hmac, byte* hash)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (hmac == NULL || hash == NULL) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_ASYNC_CRYPT) && defined(WC_ASYNC_ENABLE_HMAC)
|
||||
if (hmac->asyncDev.marker == WOLFSSL_ASYNC_MARKER_HMAC) {
|
||||
int hashLen = wc_HmacSizeByType(hmac->macType);
|
||||
|
Reference in New Issue
Block a user