[openssl] master update

Dr. Paul Dale pauli at openssl.org
Fri Jan 31 07:52:41 UTC 2020


The branch master has been updated
       via  c98eab85b8a6c5d49353a229ac1d2f4cd0b84682 (commit)
       via  4a0a9e5767f23f684267eb19e412d26cb288930d (commit)
      from  ca2bf555cd64bc9624af1259ce3cd27f95a5763e (commit)


- Log -----------------------------------------------------------------
commit c98eab85b8a6c5d49353a229ac1d2f4cd0b84682
Author: Pauli <paul.dale at oracle.com>
Date:   Thu Jan 30 09:35:37 2020 +1000

    evp_pmeth: free the MD reference correctly.
    
    The code was calling EVP_MD_meth_free which is incorrect.  It should call
    EVP_MD_free.  It happened to work but by luck rather than design.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10973)

commit 4a0a9e5767f23f684267eb19e412d26cb288930d
Author: Pauli <paul.dale at oracle.com>
Date:   Thu Jan 30 09:04:14 2020 +1000

    scrypt: free the MD reference correctly.
    
    The code was calling EVP_MD_meth_free which is incorrect.  It should call
    EVP_MD_free.  It happened to work but by luck rather than design.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10973)

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

Summary of changes:
 crypto/evp/pmeth_lib.c                  | 2 +-
 providers/implementations/kdfs/scrypt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index dda9358c4e..075e87fe1c 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -834,7 +834,7 @@ static int legacy_ctrl_str_to_param(EVP_PKEY_CTX *ctx, const char *name,
         if (md == NULL)
             return 0;
         ret = EVP_PKEY_CTX_set_signature_md(ctx, md);
-        EVP_MD_meth_free(md);
+        EVP_MD_free(md);
         return ret;
     }
 
diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c
index 425db1af6f..ea859b9150 100644
--- a/providers/implementations/kdfs/scrypt.c
+++ b/providers/implementations/kdfs/scrypt.c
@@ -75,7 +75,7 @@ static void kdf_scrypt_free(void *vctx)
     KDF_SCRYPT *ctx = (KDF_SCRYPT *)vctx;
 
     if (ctx != NULL) {
-        EVP_MD_meth_free(ctx->sha256);
+        EVP_MD_free(ctx->sha256);
         kdf_scrypt_reset(ctx);
         OPENSSL_free(ctx);
     }


More information about the openssl-commits mailing list