]> granicus.if.org Git - openssl/commitdiff
If EVP_PKEY structure contains an ENGINE the key is ENGINE specific and
authorDr. Stephen Henson <steve@openssl.org>
Tue, 16 Nov 2010 12:11:46 +0000 (12:11 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 16 Nov 2010 12:11:46 +0000 (12:11 +0000)
we should use its method instead of any generic one.

crypto/evp/pmeth_lib.c

index 29448c00ecba750ac73eb0ee6d045cb9a5597fdc..bc7c8305a0e160133446a44468336288e5e72d6f 100644 (file)
@@ -135,6 +135,8 @@ static EVP_PKEY_CTX *int_ctx_new(EVP_PKEY *pkey, ENGINE *e, int id)
                id = pkey->ameth->pkey_id;
                }
 #ifndef OPENSSL_NO_ENGINE
+       if (pkey && pkey->engine)
+               e = pkey->engine;
        /* Try to find an ENGINE which implements this method */
        if (e)
                {