Remove init of MACs from EVP
[openssl.git] / crypto / evp / pbe_scrypt.c
index 722402528a8e81b41ee01319fb4e0f463a09b3a5..c0ab238eb8f36a125aace3d7036d9febc306a609 100644 (file)
@@ -10,6 +10,7 @@
 #include <openssl/evp.h>
 #include <openssl/err.h>
 #include <openssl/kdf.h>
+#include "internal/numbers.h"
 
 #ifndef OPENSSL_NO_SCRYPT
 
@@ -51,6 +52,10 @@ int EVP_PBE_scrypt(const char *pass, size_t passlen,
         pass = empty;
         passlen = 0;
     }
+    if (salt == NULL) {
+        salt = (const unsigned char *)empty;
+        saltlen = 0;
+    }
     if (maxmem == 0)
         maxmem = SCRYPT_MAX_MEM;