summaryrefslogtreecommitdiffstats
path: root/crypto/evp/pmeth_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-11-16 12:11:31 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-11-16 12:11:31 +0000
commit972491aecef215d1a5dec78ee8c440d75706d36f (patch)
tree093b77eeb8772416fda2a63aa27a9f0715a8890d /crypto/evp/pmeth_lib.c
parent1a8ecda3ee67728dc1619920abf07d01c8b73efa (diff)
If EVP_PKEY structure contains an ENGINE the key is ENGINE specific and
we should use its method instead of any generic one.
Diffstat (limited to 'crypto/evp/pmeth_lib.c')
-rw-r--r--crypto/evp/pmeth_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c
index b2d8de3a8d..5481d4b8a5 100644
--- a/crypto/evp/pmeth_lib.c
+++ b/crypto/evp/pmeth_lib.c
@@ -134,6 +134,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)
{