1=pod
2
3=head1 NAME
4
5EVP_PKEY_settable_params, EVP_PKEY_set_params,
6EVP_PKEY_set_int_param, EVP_PKEY_set_size_t_param, EVP_PKEY_set_bn_param,
7EVP_PKEY_set_utf8_string_param, EVP_PKEY_set_octet_string_param
8- set key parameters into a key
9
10=head1 SYNOPSIS
11
12 #include <openssl/evp.h>
13
14 const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
15 int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
16 int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
17 int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
18 int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
19                           const BIGNUM *bn);
20 int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
21                                    const char *str);
22 int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
23                                     const unsigned char *buf, size_t bsize);
24
25=head1 DESCRIPTION
26
27These functions can be used to set additional parameters into an existing
28B<EVP_PKEY>.
29
30EVP_PKEY_set_params() sets one or more I<params> into a I<pkey>.
31See L<OSSL_PARAM(3)> for information about parameters.
32
33EVP_PKEY_settable_params() returns a constant list of I<params> indicating
34the names and types of key parameters that can be set.
35See L<OSSL_PARAM(3)> for information about parameters.
36
37EVP_PKEY_set_int_param() sets an integer value I<in> into a key I<pkey> for the
38associated field I<key_name>.
39
40EVP_PKEY_set_size_t_param() sets an size_t value I<in> into a key I<pkey> for
41the associated field I<key_name>.
42
43EVP_PKEY_set_bn_param() sets the BIGNUM value I<bn> into a key I<pkey> for the
44associated field I<key_name>.
45
46EVP_PKEY_set_utf8_string_param() sets the UTF8 string I<str> into a key I<pkey>
47for the associated field I<key_name>.
48
49EVP_PKEY_set_octet_string_param() sets the octet string value I<buf> with a
50size I<bsize> into a key I<pkey> for the associated field I<key_name>.
51
52=head1 NOTES
53
54These functions only work for B<EVP_PKEY>s that contain a provider side key.
55
56=head1 RETURN VALUES
57
58EVP_PKEY_settable_params() returns NULL on error or if it is not supported,
59
60All other methods return 1 if a value was successfully set, or 0 if
61there was an error.
62
63=head1 SEE ALSO
64
65L<EVP_PKEY_gettable_params(3)>,
66L<EVP_PKEY_CTX_new(3)>, L<provider-keymgmt(7)>, L<OSSL_PARAM(3)>,
67
68
69=head1 HISTORY
70
71These functions were added in OpenSSL 3.0.
72
73=head1 COPYRIGHT
74
75Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
76
77Licensed under the Apache License 2.0 (the "License").  You may not use
78this file except in compliance with the License.  You can obtain a copy
79in the file LICENSE in the source distribution or at
80L<https://www.openssl.org/source/license.html>.
81
82=cut
83
84