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