diff options
author | schwarze <> | 2023-09-09 14:31:38 +0000 |
---|---|---|
committer | schwarze <> | 2023-09-09 14:31:38 +0000 |
commit | 235a01a03d29cd07cde581e34ae6ca4f4ad3eed8 (patch) | |
tree | a9dd521bd5ab0cce54c1bcd4dd9bbf1c906e6e6c | |
parent | 51b92f8d21cbaaec94c215308fccd3b3741f99fb (diff) | |
download | openbsd-235a01a03d29cd07cde581e34ae6ca4f4ad3eed8.tar.gz openbsd-235a01a03d29cd07cde581e34ae6ca4f4ad3eed8.tar.bz2 openbsd-235a01a03d29cd07cde581e34ae6ca4f4ad3eed8.zip |
Document EVP_PKEY_CTX_set0_keygen_info(3).
While here, also add the missing RETURN VALUES entries
for EVP_PKEY_gen_cb(3), EVP_PKEY_CTX_get_cb(3),
and EVP_PKEY_CTX_get_keygen_info(3).
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_keygen.3 | 69 |
1 files changed, 59 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_keygen.3 b/src/lib/libcrypto/man/EVP_PKEY_keygen.3 index aae994541f..7641dba5a2 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_keygen.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_keygen.3 | |||
@@ -1,8 +1,24 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_keygen.3,v 1.11 2023/04/25 16:50:33 tb Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_keygen.3,v 1.12 2023/09/09 14:31:38 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100 | 2 | .\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
3 | .\" selective merge up to: OpenSSL 48e5119a Jan 19 10:49:22 2018 +0100 | ||
4 | .\" | 3 | .\" |
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file is a derived work. |
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2006, 2009, 2013, 2015, 2016, 2018 The OpenSSL Project. | 22 | .\" Copyright (c) 2006, 2009, 2013, 2015, 2016, 2018 The OpenSSL Project. |
7 | .\" All rights reserved. | 23 | .\" All rights reserved. |
8 | .\" | 24 | .\" |
@@ -50,7 +66,7 @@ | |||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
52 | .\" | 68 | .\" |
53 | .Dd $Mdocdate: April 25 2023 $ | 69 | .Dd $Mdocdate: September 9 2023 $ |
54 | .Dt EVP_PKEY_KEYGEN 3 | 70 | .Dt EVP_PKEY_KEYGEN 3 |
55 | .Os | 71 | .Os |
56 | .Sh NAME | 72 | .Sh NAME |
@@ -61,6 +77,7 @@ | |||
61 | .Nm EVP_PKEY_gen_cb , | 77 | .Nm EVP_PKEY_gen_cb , |
62 | .Nm EVP_PKEY_CTX_set_cb , | 78 | .Nm EVP_PKEY_CTX_set_cb , |
63 | .Nm EVP_PKEY_CTX_get_cb , | 79 | .Nm EVP_PKEY_CTX_get_cb , |
80 | .Nm EVP_PKEY_CTX_set0_keygen_info , | ||
64 | .Nm EVP_PKEY_CTX_get_keygen_info , | 81 | .Nm EVP_PKEY_CTX_get_keygen_info , |
65 | .Nm EVP_PKEY_CTX_set_app_data , | 82 | .Nm EVP_PKEY_CTX_set_app_data , |
66 | .Nm EVP_PKEY_CTX_get_app_data | 83 | .Nm EVP_PKEY_CTX_get_app_data |
@@ -98,6 +115,12 @@ | |||
98 | .Fo EVP_PKEY_CTX_get_cb | 115 | .Fo EVP_PKEY_CTX_get_cb |
99 | .Fa "EVP_PKEY_CTX *ctx" | 116 | .Fa "EVP_PKEY_CTX *ctx" |
100 | .Fc | 117 | .Fc |
118 | .Ft void | ||
119 | .Fo EVP_PKEY_CTX_set0_keygen_info | ||
120 | .Fa "EVP_PKEY_CTX *ctx" | ||
121 | .Fa "int *dat" | ||
122 | .Fa "int datlen" | ||
123 | .Fc | ||
101 | .Ft int | 124 | .Ft int |
102 | .Fo EVP_PKEY_CTX_get_keygen_info | 125 | .Fo EVP_PKEY_CTX_get_keygen_info |
103 | .Fa "EVP_PKEY_CTX *ctx" | 126 | .Fa "EVP_PKEY_CTX *ctx" |
@@ -131,13 +154,22 @@ and | |||
131 | .Fn EVP_PKEY_paramgen | 154 | .Fn EVP_PKEY_paramgen |
132 | are similar except parameters are generated. | 155 | are similar except parameters are generated. |
133 | .Pp | 156 | .Pp |
134 | The function | 157 | The functions |
135 | .Fn EVP_PKEY_CTX_set_cb | 158 | .Fn EVP_PKEY_CTX_set_cb |
136 | sets the key or parameter generation callback to | 159 | and |
137 | .Fa cb . | ||
138 | The function | ||
139 | .Fn EVP_PKEY_CTX_get_cb | 160 | .Fn EVP_PKEY_CTX_get_cb |
140 | returns the key or parameter generation callback. | 161 | set and retrieve the key or parameter generation callback, respectively. |
162 | .Pp | ||
163 | The function | ||
164 | .Fn EVP_PKEY_CTX_set0_keygen_info | ||
165 | sets the parameters associated with the generation operation to the array | ||
166 | .Fa dat | ||
167 | containing | ||
168 | .Ft datlen | ||
169 | integer parameters. | ||
170 | The caller retains ownership of the | ||
171 | .Fa dat | ||
172 | array; it will never be freed by the library. | ||
141 | .Pp | 173 | .Pp |
142 | The function | 174 | The function |
143 | .Fn EVP_PKEY_CTX_get_keygen_info | 175 | .Fn EVP_PKEY_CTX_get_keygen_info |
@@ -209,6 +241,23 @@ and | |||
209 | return 1 for success and 0 or a negative value for failure. | 241 | return 1 for success and 0 or a negative value for failure. |
210 | In particular, a return value of -2 indicates the operation is not | 242 | In particular, a return value of -2 indicates the operation is not |
211 | supported by the public key algorithm. | 243 | supported by the public key algorithm. |
244 | .Pp | ||
245 | Callback functions of the type | ||
246 | .Fn EVP_PKEY_gen_cb | ||
247 | are supposed to return 1 on success or 0 on error. | ||
248 | .Pp | ||
249 | .Fn EVP_PKEY_CTX_get_cb | ||
250 | returns a function pointer to the currently installed callback function or | ||
251 | .Dv NULL | ||
252 | if no callback function is installed. | ||
253 | .Pp | ||
254 | .Fn EVP_PKEY_CTX_get_keygen_info | ||
255 | retuns the number of available parameters if | ||
256 | .Fa idx | ||
257 | is \-1, one of these parameters if | ||
258 | .Fa idx | ||
259 | is greater than or equal to zero but less than the number | ||
260 | of available parameters, or 0 otherwise. | ||
212 | .Sh EXAMPLES | 261 | .Sh EXAMPLES |
213 | Generate a 2048-bit RSA key: | 262 | Generate a 2048-bit RSA key: |
214 | .Bd -literal -offset indent | 263 | .Bd -literal -offset indent |