Restoring correct check for legacy PKEY
authorDmitry Belyavskiy <beldmit@gmail.com>
Tue, 14 Jan 2020 08:09:30 +0000 (11:09 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Wed, 15 Jan 2020 08:50:10 +0000 (11:50 +0300)
The fix inroduced in #10758 was rolled back by accident.
Restoring it.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10839)

crypto/evp/pmeth_lib.c

index 428b97b..24e2fdc 100644 (file)
@@ -150,7 +150,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;