Skip to content
Closed
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: 5 additions & 1 deletion wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7157,6 +7157,7 @@ void wolfSSL_EVP_init(void)
{
int ret;
int hashType = WC_HASH_TYPE_NONE;
int saltSz = 0;
WC_DECLARE_VAR(info, EncryptedInfo, 1, 0);

#ifdef WOLFSSL_SMALL_STACK
Expand Down Expand Up @@ -7187,8 +7188,11 @@ void wolfSSL_EVP_init(void)
if (count <= 0)
count = 1;

if (salt != NULL)
saltSz = EVP_SALT_SIZE;

ret = wc_PBKDF1_ex(key, (int)info->keySz, iv, (int)info->ivSz, data, sz,
salt, EVP_SALT_SIZE, count, hashType, NULL);
salt, saltSz, count, hashType, NULL);
if (ret == 0)
ret = (int)info->keySz;

Expand Down
Loading