[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sun Mar 17 09:28:06 UTC 2019


The branch master has been updated
       via  253d7622222166959d1a5e724434aae3fbd2537d (commit)
      from  f7f2a55aeee12926a7080d75d38f03467eb1ac44 (commit)


- Log -----------------------------------------------------------------
commit 253d7622222166959d1a5e724434aae3fbd2537d
Author: Victor Stinner <vstinner at redhat.com>
Date:   Thu Mar 14 15:23:04 2019 +0100

    EVP_PBE_scrypt() handles salt=NULL as salt=""
    
    Modify EVP_PBE_scrypt() to maintain OpenSSL 1.1.1 behavior: salt=NULL
    is now handled as salt="" (and saltlen=0).
    
    Commit 5a285addbf39f91d567f95f04b2b41764127950d changed the behavior
    of EVP_PBE_scrypt(salt=NULL). Previously, salt=NULL was accepted, but
    the function now fails with KDF_R_MISSING_SALT.
    
    CLA: trivial
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Paul Dale <paul.dale at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/8483)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/pbe_scrypt.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/crypto/evp/pbe_scrypt.c b/crypto/evp/pbe_scrypt.c
index cad0440..c0ab238 100644
--- a/crypto/evp/pbe_scrypt.c
+++ b/crypto/evp/pbe_scrypt.c
@@ -52,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;
 


More information about the openssl-commits mailing list