summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/EVP_PKEY_keygen.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/EVP_PKEY_keygen.3')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_keygen.338
1 files changed, 32 insertions, 6 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_keygen.3 b/src/lib/libcrypto/man/EVP_PKEY_keygen.3
index 32ed4a15c8..e75859b486 100644
--- a/src/lib/libcrypto/man/EVP_PKEY_keygen.3
+++ b/src/lib/libcrypto/man/EVP_PKEY_keygen.3
@@ -1,10 +1,10 @@
1.\" $OpenBSD: EVP_PKEY_keygen.3,v 1.14 2024/07/21 08:02:17 tb Exp $ 1.\" $OpenBSD: EVP_PKEY_keygen.3,v 1.15 2024/12/06 14:27:49 schwarze Exp $
2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 2.\" full merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100
3.\" 3.\"
4.\" This file is a derived work. 4.\" This file is a derived work.
5.\" The changes are covered by the following Copyright and license: 5.\" The changes are covered by the following Copyright and license:
6.\" 6.\"
7.\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> 7.\" Copyright (c) 2023, 2024 Ingo Schwarze <schwarze@openbsd.org>
8.\" 8.\"
9.\" Permission to use, copy, modify, and distribute this software for any 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 10.\" purpose with or without fee is hereby granted, provided that the above
@@ -66,7 +66,7 @@
66.\" 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
67.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
68.\" 68.\"
69.Dd $Mdocdate: July 21 2024 $ 69.Dd $Mdocdate: December 6 2024 $
70.Dt EVP_PKEY_KEYGEN 3 70.Dt EVP_PKEY_KEYGEN 3
71.Os 71.Os
72.Sh NAME 72.Sh NAME
@@ -80,7 +80,9 @@
80.Nm EVP_PKEY_CTX_set0_keygen_info , 80.Nm EVP_PKEY_CTX_set0_keygen_info ,
81.Nm EVP_PKEY_CTX_get_keygen_info , 81.Nm EVP_PKEY_CTX_get_keygen_info ,
82.Nm EVP_PKEY_CTX_set_app_data , 82.Nm EVP_PKEY_CTX_set_app_data ,
83.Nm EVP_PKEY_CTX_get_app_data 83.Nm EVP_PKEY_CTX_get_app_data ,
84.Nm EVP_PKEY_CTX_set_data ,
85.Nm EVP_PKEY_CTX_get_data
84.Nd key and parameter generation functions 86.Nd key and parameter generation functions
85.Sh SYNOPSIS 87.Sh SYNOPSIS
86.In openssl/evp.h 88.In openssl/evp.h
@@ -129,12 +131,21 @@
129.Ft void 131.Ft void
130.Fo EVP_PKEY_CTX_set_app_data 132.Fo EVP_PKEY_CTX_set_app_data
131.Fa "EVP_PKEY_CTX *ctx" 133.Fa "EVP_PKEY_CTX *ctx"
132.Fa "void *data" 134.Fa "void *app_data"
133.Fc 135.Fc
134.Ft void * 136.Ft void *
135.Fo EVP_PKEY_CTX_get_app_data 137.Fo EVP_PKEY_CTX_get_app_data
136.Fa "EVP_PKEY_CTX *ctx" 138.Fa "EVP_PKEY_CTX *ctx"
137.Fc 139.Fc
140.Ft void
141.Fo EVP_PKEY_CTX_set_data
142.Fa "EVP_PKEY_CTX *ctx"
143.Fa "void *data"
144.Fc
145.Ft void *
146.Fo EVP_PKEY_CTX_get_data
147.Fa "EVP_PKEY_CTX *ctx"
148.Fc
138.Sh DESCRIPTION 149.Sh DESCRIPTION
139The 150The
140.Fn EVP_PKEY_keygen_init 151.Fn EVP_PKEY_keygen_init
@@ -197,6 +208,14 @@ This can be used to set some application defined value which can be
197retrieved in the callback: for example a handle which is used to update 208retrieved in the callback: for example a handle which is used to update
198a "progress dialog". 209a "progress dialog".
199.Pp 210.Pp
211The deprecated functions
212.Fn EVP_PKEY_CTX_set_data
213and
214.Fn EVP_PKEY_CTX_get_data
215set and retrieve a
216.Em different
217opaque pointer that is ignored by the library.
218.Pp
200After the call to 219After the call to
201.Fn EVP_PKEY_keygen_init 220.Fn EVP_PKEY_keygen_init
202or 221or
@@ -258,6 +277,14 @@ is \-1, one of these parameters if
258.Fa idx 277.Fa idx
259is greater than or equal to zero but less than the number 278is greater than or equal to zero but less than the number
260of available parameters, or 0 otherwise. 279of available parameters, or 0 otherwise.
280.Pp
281.Fn EVP_PKEY_CTX_get_app_data
282and
283.Fn EVP_PKEY_CTX_get_data
284return the pointer that was last passed to the corresponding set function, or
285.Dv NULL
286if the corresponding set function was never called on
287.Fa ctx .
261.Sh EXAMPLES 288.Sh EXAMPLES
262Generate a 2048-bit RSA key: 289Generate a 2048-bit RSA key:
263.Bd -literal -offset indent 290.Bd -literal -offset indent
@@ -332,7 +359,6 @@ genpkey_cb(EVP_PKEY_CTX *ctx)
332.Xr EVP_PKEY_decrypt 3 , 359.Xr EVP_PKEY_decrypt 3 ,
333.Xr EVP_PKEY_derive 3 , 360.Xr EVP_PKEY_derive 3 ,
334.Xr EVP_PKEY_encrypt 3 , 361.Xr EVP_PKEY_encrypt 3 ,
335.Xr EVP_PKEY_meth_set_keygen 3 ,
336.Xr EVP_PKEY_sign 3 , 362.Xr EVP_PKEY_sign 3 ,
337.Xr EVP_PKEY_verify 3 , 363.Xr EVP_PKEY_verify 3 ,
338.Xr EVP_PKEY_verify_recover 3 , 364.Xr EVP_PKEY_verify_recover 3 ,