Fix migration guide mappings for i2o/o2i_ECPublicKey
[openssl.git] / doc / man3 / EVP_PKEY_CTX_set_params.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_PKEY_CTX_set_params,
6 EVP_PKEY_CTX_settable_params,
7 EVP_PKEY_CTX_get_params,
8 EVP_PKEY_CTX_gettable_params
9 - provider parameter passing operations
10
11 =head1 SYNOPSIS
12
13  #include <openssl/evp.h>
14
15  int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
16  const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
17  int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
18  const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
19
20 =head1 DESCRIPTION
21
22 The EVP_PKEY_CTX_get_params() and EVP_PKEY_CTX_set_params() functions allow
23 transfer of arbitrary key parameters to and from providers.
24 Not all parameters may be supported by all providers.
25 See L<OSSL_PROVIDER(3)> for more information on providers.
26 See L<OSSL_PARAM(3)> for more information on parameters.
27 These functions must only be called after the EVP_PKEY_CTX has been initialised
28 for use in an operation.
29 These methods replace the EVP_PKEY_CTX_ctrl() mechanism. (EVP_PKEY_CTX_ctrl now
30 calls these methods internally to interact with providers).
31
32 EVP_PKEY_CTX_gettable_params() and EVP_PKEY_CTX_settable_params() get a
33 constant L<OSSL_PARAM(3)> array that describes the gettable and
34 settable parameters for the current algorithm implementation, i.e. parameters
35 that can be used with EVP_PKEY_CTX_get_params() and EVP_PKEY_CTX_set_params()
36 respectively.
37 These functions must only be called after the EVP_PKEY_CTX has been initialised
38 for use in an operation.
39
40 =head2 Parameters
41
42 Examples of EVP_PKEY parameters include the following:
43
44 L<provider-keymgmt(7)/Common parameters>
45 L<provider-keyexch(7)/Key Exchange parameters>
46 L<provider-signature(7)/Signature parameters>
47
48 L<EVP_PKEY-RSA(7)/Common RSA parameters>
49 L<EVP_PKEY-RSA(7)/RSA key generation parameters>
50 L<EVP_PKEY-FFC(7)/FFC parameters>
51 L<EVP_PKEY-FFC(7)/FFC key generation parameters>
52 L<EVP_PKEY-DSA(7)/DSA parameters>
53 L<EVP_PKEY-DSA(7)/DSA key generation parameters>
54 L<EVP_PKEY-DH(7)/DH parameters>
55 L<EVP_PKEY-DH(7)/DH key generation parameters>
56 L<EVP_PKEY-EC(7)/Common EC parameters>
57 L<EVP_PKEY-X25519(7)/Common X25519, X448, ED25519 and ED448 parameters>
58
59 =head1 RETURN VALUES
60
61 EVP_PKEY_CTX_set_params() returns 1 for success or 0 otherwise.
62 EVP_PKEY_CTX_settable_params() returns an OSSL_PARAM array on success or NULL on
63 error.
64 It may also return NULL if there are no settable parameters available.
65
66 All other functions and macros described on this page return a positive value
67 for success and 0 or a negative value for failure. In particular a return value
68 of -2 indicates the operation is not supported by the public key algorithm.
69
70 =head1 SEE ALSO
71
72 L<EVP_PKEY_CTX_new(3)>,
73 L<EVP_PKEY_encrypt(3)>,
74 L<EVP_PKEY_decrypt(3)>,
75 L<EVP_PKEY_sign(3)>,
76 L<EVP_PKEY_verify(3)>,
77 L<EVP_PKEY_verify_recover(3)>,
78 L<EVP_PKEY_derive(3)>,
79 L<EVP_PKEY_keygen(3)>
80
81 =head1 HISTORY
82
83 All functions were added in OpenSSL 3.0.
84
85 =head1 COPYRIGHT
86
87 Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
88
89 Licensed under the Apache License 2.0 (the "License").  You may not use
90 this file except in compliance with the License.  You can obtain a copy
91 in the file LICENSE in the source distribution or at
92 L<https://www.openssl.org/source/license.html>.
93
94 =cut