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