Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions wolfcrypt/src/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ int wc_HashUpdate(wc_HashAlg* hash, enum wc_HashType type, const byte* data,
return BAD_FUNC_ARG;

#ifdef DEBUG_WOLFSSL
if (hash->type != type) {
if (hash->type != WC_HASH_TYPE_NONE && hash->type != type) {
WOLFSSL_MSG("Hash update type mismatch!");
return BAD_FUNC_ARG;
}
Expand Down Expand Up @@ -1292,7 +1292,7 @@ int wc_HashFinal(wc_HashAlg* hash, enum wc_HashType type, byte* out)
return BAD_FUNC_ARG;

#ifdef DEBUG_WOLFSSL
if (hash->type != type) {
if (hash->type != WC_HASH_TYPE_NONE && hash->type != type) {
WOLFSSL_MSG("Hash final type mismatch!");
return BAD_FUNC_ARG;
}
Expand Down Expand Up @@ -1443,7 +1443,7 @@ int wc_HashFree(wc_HashAlg* hash, enum wc_HashType type)
return BAD_FUNC_ARG;

#ifdef DEBUG_WOLFSSL
if (hash->type != type) {
if (hash->type != WC_HASH_TYPE_NONE && hash->type != type) {
WOLFSSL_MSG("Hash free type mismatch!");
return BAD_FUNC_ARG;
}
Expand Down
Loading