diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2010-11-16 12:11:15 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2010-11-16 12:11:15 +0000 |
commit | febcec6254e59142571953da795309360ed9003d (patch) | |
tree | 8719820f9fc8814ff85d1a2702eb29729c12d3c4 | |
parent | f07cb1ce8e1f641de5857421e96d607cf1771932 (diff) |
If EVP_PKEY structure contains an ENGINE the key is ENGINE specific and
we should use its method instead of any generic one.
-rw-r--r-- | crypto/evp/pmeth_lib.c | 2 |
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) { |