fix scrypt test with no password

This commit is contained in:
Jacob Barthelmeh
2017-04-13 15:06:26 -06:00
parent 3df47d57ab
commit 620d21c850

View File

@@ -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)) {