]>
Commit | Line | Data |
---|---|---|
70a1f7b4 RL |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
4cae07fe RL |
5 | evp_keymgmt_export_to_provider, |
6 | evp_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 | ||
18 | evp_keymgmt_export_to_provider() exports the key material from the | |
19 | given key I<pk> to a provider via a B<EVP_KEYMGMT> interface, if this | |
20 | hasn't already been done. | |
21 | It maintains a cache of provider key references in I<pk> to keep track | |
22 | of all such exports. | |
23 | ||
24 | If I<pk> has an assigned legacy key, a check is done to see if any of | |
25 | its key material has changed since last export, i.e. the legacy key's | |
26 | is_dirty() method returns 1. | |
27 | If it has, the cache of already exported keys is cleared, and a new | |
28 | export is made with the new key material. | |
29 | ||
4cae07fe RL |
30 | evp_keymgmt_clear_pkey_cache() can be used to explicitly clear the |
31 | cache of provider key references. | |
32 | ||
70a1f7b4 RL |
33 | =head1 RETURN VALUES |
34 | ||
4cae07fe RL |
35 | evp_keymgmt_export_to_provider() returns a pointer to the appropriate |
36 | provider 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 | |
41 | B<EVP_PKEY> with EVP_PKEY_assign_RSA() and similar functions. | |
42 | ||
43 | =head1 SEE ALSO | |
44 | ||
45 | L<EVP_PKEY_ASN1_METHOD(3)>, L<EVP_PKEY_assign_RSA(3)> | |
46 | ||
47 | =head1 COPYRIGHT | |
48 | ||
49 | Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. | |
50 | ||
51 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
52 | this file except in compliance with the License. You can obtain a copy | |
53 | in the file LICENSE in the source distribution or at | |
54 | L<https://www.openssl.org/source/license.html>. | |
55 | ||
56 | =cut |