| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "EVP_PKEY_CTX_SET_PARAMS 3SSL" |
| 58 |
.TH EVP_PKEY_CTX_SET_PARAMS 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
EVP_PKEY_CTX_set_params, |
| 65 |
EVP_PKEY_CTX_settable_params, |
| 66 |
EVP_PKEY_CTX_get_params, |
| 67 |
EVP_PKEY_CTX_gettable_params |
| 68 |
\&\- provider parameter passing operations |
| 69 |
.SH SYNOPSIS |
| 70 |
.IX Header "SYNOPSIS" |
| 71 |
.Vb 1 |
| 72 |
\& #include <openssl/evp.h> |
| 73 |
\& |
| 74 |
\& int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params); |
| 75 |
\& const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx); |
| 76 |
\& int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); |
| 77 |
\& const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx); |
| 78 |
.Ve |
| 79 |
.SH DESCRIPTION |
| 80 |
.IX Header "DESCRIPTION" |
| 81 |
The \fBEVP_PKEY_CTX_get_params()\fR and \fBEVP_PKEY_CTX_set_params()\fR functions allow |
| 82 |
transfer of arbitrary key parameters to and from providers. |
| 83 |
Not all parameters may be supported by all providers. |
| 84 |
See \fBOSSL_PROVIDER\fR\|(3) for more information on providers. |
| 85 |
The \fIparams\fR field is a pointer to a list of \fBOSSL_PARAM\fR structures, |
| 86 |
terminated with a \fBOSSL_PARAM_END\fR\|(3) struct. |
| 87 |
See \fBOSSL_PARAM\fR\|(3) for information about passing parameters. |
| 88 |
These functions must only be called after the EVP_PKEY_CTX has been initialised |
| 89 |
for use in an operation. |
| 90 |
These methods replace the \fBEVP_PKEY_CTX_ctrl()\fR mechanism. (EVP_PKEY_CTX_ctrl now |
| 91 |
calls these methods internally to interact with providers). |
| 92 |
.PP |
| 93 |
\&\fBEVP_PKEY_CTX_gettable_params()\fR and \fBEVP_PKEY_CTX_settable_params()\fR get a |
| 94 |
constant \fBOSSL_PARAM\fR\|(3) array that describes the gettable and |
| 95 |
settable parameters for the current algorithm implementation, i.e. parameters |
| 96 |
that can be used with \fBEVP_PKEY_CTX_get_params()\fR and \fBEVP_PKEY_CTX_set_params()\fR |
| 97 |
respectively. |
| 98 |
These functions must only be called after the EVP_PKEY_CTX has been initialised |
| 99 |
for use in an operation. |
| 100 |
.SS Parameters |
| 101 |
.IX Subsection "Parameters" |
| 102 |
Examples of EVP_PKEY parameters include the following: |
| 103 |
.PP |
| 104 |
"Common parameters" in \fBprovider\-keymgmt\fR\|(7) |
| 105 |
"Key Exchange parameters" in \fBprovider\-keyexch\fR\|(7) |
| 106 |
"Signature parameters" in \fBprovider\-signature\fR\|(7) |
| 107 |
.PP |
| 108 |
"Common RSA parameters" in \fBEVP_PKEY\-RSA\fR\|(7) |
| 109 |
"RSA key generation parameters" in \fBEVP_PKEY\-RSA\fR\|(7) |
| 110 |
"FFC parameters" in \fBEVP_PKEY\-FFC\fR\|(7) |
| 111 |
"FFC key generation parameters" in \fBEVP_PKEY\-FFC\fR\|(7) |
| 112 |
"DSA parameters" in \fBEVP_PKEY\-DSA\fR\|(7) |
| 113 |
"DSA key generation parameters" in \fBEVP_PKEY\-DSA\fR\|(7) |
| 114 |
"DH parameters" in \fBEVP_PKEY\-DH\fR\|(7) |
| 115 |
"DH key generation parameters" in \fBEVP_PKEY\-DH\fR\|(7) |
| 116 |
"Common EC parameters" in \fBEVP_PKEY\-EC\fR\|(7) |
| 117 |
"Common X25519, X448, ED25519 and ED448 parameters" in \fBEVP_PKEY\-X25519\fR\|(7) |
| 118 |
"Common LMS parameters" in \fBEVP_PKEY\-LMS\fR\|(7) |
| 119 |
"Common parameters" in \fBEVP_PKEY\-ML\-DSA\fR\|(7) |
| 120 |
"Common parameters" in \fBEVP_PKEY\-ML\-KEM\fR\|(7) |
| 121 |
.SH "RETURN VALUES" |
| 122 |
.IX Header "RETURN VALUES" |
| 123 |
\&\fBEVP_PKEY_CTX_set_params()\fR returns 1 for success or 0 otherwise. |
| 124 |
\&\fBEVP_PKEY_CTX_settable_params()\fR returns an OSSL_PARAM array on success or NULL on |
| 125 |
error. |
| 126 |
It may also return NULL if there are no settable parameters available. |
| 127 |
.PP |
| 128 |
All other functions and macros described on this page return a positive value |
| 129 |
for success and 0 or a negative value for failure. In particular a return value |
| 130 |
of \-2 indicates the operation is not supported by the public key algorithm. |
| 131 |
.SH NOTES |
| 132 |
.IX Header "NOTES" |
| 133 |
LMS support is disabled by default at compile-time. |
| 134 |
To enable, specify the \fBenable-lms\fR build configuration option. |
| 135 |
.SH "SEE ALSO" |
| 136 |
.IX Header "SEE ALSO" |
| 137 |
\&\fBEVP_PKEY_CTX_new\fR\|(3), |
| 138 |
\&\fBEVP_PKEY_encrypt\fR\|(3), |
| 139 |
\&\fBEVP_PKEY_decrypt\fR\|(3), |
| 140 |
\&\fBEVP_PKEY_sign\fR\|(3), |
| 141 |
\&\fBEVP_PKEY_verify\fR\|(3), |
| 142 |
\&\fBEVP_PKEY_verify_recover\fR\|(3), |
| 143 |
\&\fBEVP_PKEY_derive\fR\|(3), |
| 144 |
\&\fBEVP_PKEY_keygen\fR\|(3) |
| 145 |
.SH HISTORY |
| 146 |
.IX Header "HISTORY" |
| 147 |
All functions were added in OpenSSL 3.0. |
| 148 |
.PP |
| 149 |
Support for \fBML-DSA\fR> and \fBML-KEM\fR was added in OpenSSL 3.5. |
| 150 |
.PP |
| 151 |
Support for \fBLMS\fR was added in OpenSSL 3.6. |
| 152 |
.SH COPYRIGHT |
| 153 |
.IX Header "COPYRIGHT" |
| 154 |
Copyright 2020\-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 155 |
.PP |
| 156 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 157 |
this file except in compliance with the License. You can obtain a copy |
| 158 |
in the file LICENSE in the source distribution or at |
| 159 |
<https://www.openssl.org/source/license.html>. |