summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2021-05-15 07:43:06 +0200
committerMatt Caswell <matt@openssl.org>2021-05-20 12:57:22 +0100
commitbed7437b00734ee463de3c6fd6851458fa8c6cb0 (patch)
tree3bdbff41b883abd1cdb3e5b3e641e808109629c0 /include
parent0e5a4da4a86c6435c70d587d740c3096686a8500 (diff)
Modify EVP_PKEY_ASN1_METHOD's export_to function to take an importer
We previously took an EVP_KEYMGMT pointer, but now found it necessary to use a different import function in some cases. Since that's the only thing we use from EVP_KEYMGMT, we might as well pass the import function directly, allowing for some flexibility in how export_to is used. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15293)
Diffstat (limited to 'include')
-rw-r--r--include/crypto/asn1.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/crypto/asn1.h b/include/crypto/asn1.h
index 17d5f637ef..5a187e41a7 100644
--- a/include/crypto/asn1.h
+++ b/include/crypto/asn1.h
@@ -12,6 +12,7 @@
# pragma once
# include <openssl/asn1.h>
+# include <openssl/core_dispatch.h> /* OSSL_FUNC_keymgmt_import() */
/* Internal ASN1 structures and functions: not for application use */
@@ -80,8 +81,8 @@ struct evp_pkey_asn1_method_st {
/* Exports and imports to / from providers */
size_t (*dirty_cnt) (const EVP_PKEY *pk);
int (*export_to) (const EVP_PKEY *pk, void *to_keydata,
- EVP_KEYMGMT *to_keymgmt, OSSL_LIB_CTX *libctx,
- const char *propq);
+ OSSL_FUNC_keymgmt_import_fn *importer,
+ OSSL_LIB_CTX *libctx, const char *propq);
OSSL_CALLBACK *import_from;
int (*copy) (EVP_PKEY *to, EVP_PKEY *from);