projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rethink the EVP_PKEY cache of provider side keys
[oweals/openssl.git]
/
crypto
/
evp
/
pmeth_fn.c
diff --git
a/crypto/evp/pmeth_fn.c
b/crypto/evp/pmeth_fn.c
index 0b5af8e13600499e0b2705b9691331e0125f08cd..ca0790fcd627984eb7d618e17cdf14efa8e8e004 100644
(file)
--- a/
crypto/evp/pmeth_fn.c
+++ b/
crypto/evp/pmeth_fn.c
@@
-41,10
+41,13
@@
static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation)
if (ctx->keytype == NULL || ctx->engine != NULL)
goto legacy;
if (ctx->keytype == NULL || ctx->engine != NULL)
goto legacy;
- /* Ensure that the key is provided. If not, go legacy */
+ /*
+ * Ensure that the key is provided, either natively, or as a cached export.
+ * If not, go legacy
+ */
tmp_keymgmt = ctx->keymgmt;
tmp_keymgmt = ctx->keymgmt;
- provkey = evp_pkey_
make_provided
(ctx->pkey, ctx->libctx,
- &tmp_keymgmt, ctx->propquery);
+ provkey = evp_pkey_
export_to_provider
(ctx->pkey, ctx->libctx,
+
&tmp_keymgmt, ctx->propquery);
if (provkey == NULL)
goto legacy;
if (!EVP_KEYMGMT_up_ref(tmp_keymgmt)) {
if (provkey == NULL)
goto legacy;
if (!EVP_KEYMGMT_up_ref(tmp_keymgmt)) {