summaryrefslogtreecommitdiffstats
path: root/include/crypto/evp.h
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-04-07 19:35:13 +0200
committerTomas Mraz <tomas@openssl.org>2021-04-15 09:19:39 +0200
commit4a9fe33c8e12f4fefae0471c0834f8e674dc7e4e (patch)
tree479171af7347523257b843893173927cbbc6e572 /include/crypto/evp.h
parentb9cd82f95bf99eab4e1b0420918e7139db091c4b (diff)
Implement provider-side keymgmt_dup function
To avoid mutating key data add OSSL_FUNC_KEYMGMT_DUP function to the provider API and implement it for all asym-key key managements. Use it when copying everything to an empty EVP_PKEY which is the case with EVP_PKEY_dup(). Fixes #14658 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14793)
Diffstat (limited to 'include/crypto/evp.h')
-rw-r--r--include/crypto/evp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/evp.h b/include/crypto/evp.h
index 8ea5a2bf35..5f48d38f98 100644
--- a/include/crypto/evp.h
+++ b/include/crypto/evp.h
@@ -813,6 +813,8 @@ const OSSL_PARAM *evp_keymgmt_export_types(const EVP_KEYMGMT *keymgmt,
int evp_keymgmt_copy(const EVP_KEYMGMT *keymgmt,
void *keydata_to, const void *keydata_from,
int selection);
+void *evp_keymgmt_dup(const EVP_KEYMGMT *keymgmt,
+ const void *keydata_from);
/* Pulling defines out of C source files */