[openssl] master update

beldmit at gmail.com beldmit at gmail.com
Mon Jan 6 10:36:04 UTC 2020


The branch master has been updated
       via  60a3399721a48931b137ae4d966a9ef4b6a85d11 (commit)
      from  bc24e3ee52aacf3afe700617a13995c8ac96c8d5 (commit)


- Log -----------------------------------------------------------------
commit 60a3399721a48931b137ae4d966a9ef4b6a85d11
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Jan 4 19:24:39 2020 +0100

    EVP: Fix method to determine if a PKEY is legacy or not
    
    For the implementation of EVP_PKEY_CTX_new(), we determined if an
    EVP_PKEY wass legacy or not by looking at 'pkey->pkey.ptr'.  It turns
    out that this code could get an unassigned EVP_PKEY, with that pointer
    being NULL, and the determination proven incorrect.
    
    The check now looks at 'pkey->ameth' instead.
    
    Fixes #10704
    
    Reviewed-by: Dmitry Belyavskiy <beldmit at gmail.com>
    (Merged from https://github.com/openssl/openssl/pull/10758)

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

Summary of changes:
 crypto/evp/pmeth_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index b1bbb9c57e..8b49baf6ab 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -131,7 +131,7 @@ static EVP_PKEY_CTX *int_ctx_new(OPENSSL_CTX *libctx,
      * If the key doesn't contain anything legacy, then it must be provided,
      * so we extract the necessary information and use that.
      */
-    if (pkey != NULL && pkey->pkey.ptr == NULL) {
+    if (pkey != NULL && pkey->ameth == NULL) {
         /* If we have an engine, something went wrong somewhere... */
         if (!ossl_assert(e == NULL))
             return NULL;


More information about the openssl-commits mailing list