forked from wolfSSL/wolfssl
fix scrypt test with no password
This commit is contained in:
@@ -237,7 +237,7 @@ int wc_HmacSetKey(Hmac* hmac, int type, const byte* key, word32 length)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
void* heap = NULL;
|
void* heap = NULL;
|
||||||
|
|
||||||
if (hmac == NULL || key == NULL ||
|
if (hmac == NULL || (key == NULL && length != 0) ||
|
||||||
!(type == MD5 || type == SHA || type == SHA256 || type == SHA384
|
!(type == MD5 || type == SHA || type == SHA256 || type == SHA384
|
||||||
|| type == SHA512 || type == BLAKE2B_ID
|
|| type == SHA512 || type == BLAKE2B_ID
|
||||||
|| type == SHA224)) {
|
|| type == SHA224)) {
|
||||||
|
Reference in New Issue
Block a user