]>
Commit | Line | Data |
---|---|---|
5165148f DSH |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
a07c17ef RL |
5 | EVP_PKEY_CTX_new, EVP_PKEY_CTX_new_id, EVP_PKEY_CTX_new_provided, |
6 | EVP_PKEY_CTX_dup, EVP_PKEY_CTX_free | |
7 | - public key algorithm context functions | |
5165148f DSH |
8 | |
9 | =head1 SYNOPSIS | |
10 | ||
11 | #include <openssl/evp.h> | |
12 | ||
13 | EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); | |
14 | EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); | |
a07c17ef RL |
15 | EVP_PKEY_CTX *EVP_PKEY_CTX_new_provided(const char *name, |
16 | const char *propquery); | |
9fdcc21f | 17 | EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx); |
5165148f DSH |
18 | void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); |
19 | ||
20 | =head1 DESCRIPTION | |
21 | ||
22 | The EVP_PKEY_CTX_new() function allocates public key algorithm context using | |
23 | the algorithm specified in B<pkey> and ENGINE B<e>. | |
24 | ||
25 | The EVP_PKEY_CTX_new_id() function allocates public key algorithm context | |
a07c17ef RL |
26 | using the algorithm specified by B<id> and ENGINE B<e>. |
27 | ||
28 | The EVP_PKEY_CTX_new_provided() function allocates a public key | |
29 | algorithm context using the algorithm specified by I<name> and the | |
30 | property query I<propquery>. The strings aren't duplicated, so they | |
31 | must remain unchanged for the lifetime of the returned B<EVP_PKEY_CTX> | |
32 | or of any of its duplicates. | |
33 | ||
34 | EVP_PKEY_CTX_new_id() and EVP_PKEY_CTX_new_provided() are normally | |
35 | used when no B<EVP_PKEY> structure is associated with the operations, | |
36 | for example during parameter generation or key generation for some | |
37 | algorithms. | |
5165148f DSH |
38 | |
39 | EVP_PKEY_CTX_dup() duplicates the context B<ctx>. | |
40 | ||
41 | EVP_PKEY_CTX_free() frees up the context B<ctx>. | |
c5ba2d99 | 42 | If B<ctx> is NULL, nothing is done. |
5165148f DSH |
43 | |
44 | =head1 NOTES | |
45 | ||
46 | The B<EVP_PKEY_CTX> structure is an opaque public key algorithm context used | |
47 | by the OpenSSL high level public key API. Contexts B<MUST NOT> be shared between | |
48 | threads: that is it is not permissible to use the same context simultaneously | |
49 | in two threads. | |
50 | ||
51 | =head1 RETURN VALUES | |
52 | ||
53 | EVP_PKEY_CTX_new(), EVP_PKEY_CTX_new_id(), EVP_PKEY_CTX_dup() returns either | |
54 | the newly allocated B<EVP_PKEY_CTX> structure of B<NULL> if an error occurred. | |
55 | ||
56 | EVP_PKEY_CTX_free() does not return a value. | |
57 | ||
58 | =head1 SEE ALSO | |
59 | ||
9b86974e | 60 | L<EVP_PKEY_new(3)> |
5165148f DSH |
61 | |
62 | =head1 HISTORY | |
63 | ||
fc5ecadd | 64 | These functions were added in OpenSSL 1.0.0. |
5165148f | 65 | |
e2f92610 RS |
66 | =head1 COPYRIGHT |
67 | ||
68 | Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. | |
69 | ||
4746f25a | 70 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
71 | this file except in compliance with the License. You can obtain a copy |
72 | in the file LICENSE in the source distribution or at | |
73 | L<https://www.openssl.org/source/license.html>. | |
74 | ||
75 | =cut |