From bed7437b00734ee463de3c6fd6851458fa8c6cb0 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 15 May 2021 07:43:06 +0200 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/15293) --- include/crypto/asn1.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') 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 +# include /* 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); -- cgit v1.2.3