From 620d21c8507410646b844f8c58a9bb8adaed7b66 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 13 Apr 2017 15:06:26 -0600 Subject: [PATCH] fix scrypt test with no password --- wolfcrypt/src/hmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/hmac.c b/wolfcrypt/src/hmac.c index f1020aa28..d724ed176 100755 --- a/wolfcrypt/src/hmac.c +++ b/wolfcrypt/src/hmac.c @@ -237,7 +237,7 @@ int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length) int ret = 0; void* heap = NULL; - if (hmac == NULL || key == NULL || + if (hmac == NULL || (key == NULL && length != 0) || !(type == MD5 || type == SHA || type == SHA256 || type == SHA384 || type == SHA512 || type == BLAKE2B_ID || type == SHA224)) {