]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/internal/man3/evp_keymgmt_export_to_provider.pod
Add evp_keymgmt_clear_pkey_cache() and use it
[thirdparty/openssl.git] / doc / internal / man3 / evp_keymgmt_export_to_provider.pod
CommitLineData
70a1f7b4
RL
1=pod
2
3=head1 NAME
4
4cae07fe
RL
5evp_keymgmt_export_to_provider,
6evp_keymgmt_clear_pkey_cache
7- key material provider export for EVP
70a1f7b4
RL
8
9=head1 SYNOPSIS
10
11 #include "internal/evp_int.h"
12
13 void *evp_keymgmt_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt);
4cae07fe 14 void evp_keymgmt_clear_pkey_cache(EVP_PKEY *pk);
70a1f7b4
RL
15
16=head1 DESCRIPTION
17
18evp_keymgmt_export_to_provider() exports the key material from the
19given key I<pk> to a provider via a B<EVP_KEYMGMT> interface, if this
20hasn't already been done.
21It maintains a cache of provider key references in I<pk> to keep track
22of all such exports.
23
24If I<pk> has an assigned legacy key, a check is done to see if any of
25its key material has changed since last export, i.e. the legacy key's
26is_dirty() method returns 1.
27If it has, the cache of already exported keys is cleared, and a new
28export is made with the new key material.
29
4cae07fe
RL
30evp_keymgmt_clear_pkey_cache() can be used to explicitly clear the
31cache of provider key references.
32
70a1f7b4
RL
33=head1 RETURN VALUES
34
4cae07fe
RL
35evp_keymgmt_export_to_provider() returns a pointer to the appropriate
36provider side key (created or found again), or NULL on error.
70a1f7b4
RL
37
38=head1 NOTES
39
40"Legacy key" is the term used for any key that has been assigned to an
41B<EVP_PKEY> with EVP_PKEY_assign_RSA() and similar functions.
42
43=head1 SEE ALSO
44
45L<EVP_PKEY_ASN1_METHOD(3)>, L<EVP_PKEY_assign_RSA(3)>
46
47=head1 COPYRIGHT
48
49Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
50
51Licensed under the Apache License 2.0 (the "License"). You may not use
52this file except in compliance with the License. You can obtain a copy
53in the file LICENSE in the source distribution or at
54L<https://www.openssl.org/source/license.html>.
55
56=cut