From 4cae07fef3b24bee1646f6085c52175ef3755d5b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 10 Jul 2019 14:30:55 +0200 Subject: Add evp_keymgmt_clear_pkey_cache() and use it This function clears the cache of provider key references, and is used in evp_keymgmt_export_to_provider() when the internal key is dirty, as well as by EVP_PKEY_free_it(). Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/9312) --- crypto/include/internal/evp_int.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/include/internal') diff --git a/crypto/include/internal/evp_int.h b/crypto/include/internal/evp_int.h index ff9b6e545b..af273f2bf3 100644 --- a/crypto/include/internal/evp_int.h +++ b/crypto/include/internal/evp_int.h @@ -560,8 +560,9 @@ void openssl_add_all_kdfs_int(void); void evp_cleanup_int(void); void evp_app_cleanup_int(void); +/* KEYMGMT helper functions */ void *evp_keymgmt_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt); - +void evp_keymgmt_clear_pkey_cache(EVP_PKEY *pk); /* Pulling defines out of C source files */ -- cgit v1.2.3