diff options
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 | 82 |
1 files changed, 69 insertions, 13 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 index 8462da6d46..a49c31cd67 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 | |||
@@ -1,9 +1,9 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.11 2018/03/23 23:18:17 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.12 2018/12/21 23:51:42 schwarze Exp $ |
2 | .\" OpenSSL EVP_PKEY_CTX_ctrl.pod 1722496f Jun 8 15:18:38 2017 -0400 | 2 | .\" full merge up to: OpenSSL e03af178 Dec 11 17:05:57 2014 -0500 |
3 | .\" OpenSSL EVP_PKEY_CTX_ctrl.pod e03af178 Dec 11 17:05:57 2014 -0500 | 3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 |
4 | .\" | 4 | .\" |
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
6 | .\" Copyright (c) 2006, 2009, 2013, 2014, 2015 The OpenSSL Project. | 6 | .\" Copyright (c) 2006, 2009, 2013, 2014, 2015, 2018 The OpenSSL Project. |
7 | .\" All rights reserved. | 7 | .\" All rights reserved. |
8 | .\" | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | 9 | .\" Redistribution and use in source and binary forms, with or without |
@@ -50,7 +50,7 @@ | |||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
52 | .\" | 52 | .\" |
53 | .Dd $Mdocdate: March 23 2018 $ | 53 | .Dd $Mdocdate: December 21 2018 $ |
54 | .Dt EVP_PKEY_CTX_CTRL 3 | 54 | .Dt EVP_PKEY_CTX_CTRL 3 |
55 | .Os | 55 | .Os |
56 | .Sh NAME | 56 | .Sh NAME |
@@ -58,9 +58,13 @@ | |||
58 | .Nm EVP_PKEY_CTX_ctrl_str , | 58 | .Nm EVP_PKEY_CTX_ctrl_str , |
59 | .Nm EVP_PKEY_CTX_set_signature_md , | 59 | .Nm EVP_PKEY_CTX_set_signature_md , |
60 | .Nm EVP_PKEY_CTX_set_rsa_padding , | 60 | .Nm EVP_PKEY_CTX_set_rsa_padding , |
61 | .Nm EVP_PKEY_CTX_get_rsa_padding , | ||
61 | .Nm EVP_PKEY_CTX_set_rsa_pss_saltlen , | 62 | .Nm EVP_PKEY_CTX_set_rsa_pss_saltlen , |
63 | .Nm EVP_PKEY_CTX_get_rsa_pss_saltlen , | ||
62 | .Nm EVP_PKEY_CTX_set_rsa_keygen_bits , | 64 | .Nm EVP_PKEY_CTX_set_rsa_keygen_bits , |
63 | .Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp , | 65 | .Nm EVP_PKEY_CTX_set_rsa_keygen_pubexp , |
66 | .Nm EVP_PKEY_CTX_set_rsa_mgf1_md , | ||
67 | .Nm EVP_PKEY_CTX_get_rsa_mgf1_md , | ||
64 | .Nm EVP_PKEY_CTX_set_dsa_paramgen_bits , | 68 | .Nm EVP_PKEY_CTX_set_dsa_paramgen_bits , |
65 | .Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len , | 69 | .Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len , |
66 | .Nm EVP_PKEY_CTX_set_dh_paramgen_generator , | 70 | .Nm EVP_PKEY_CTX_set_dh_paramgen_generator , |
@@ -83,23 +87,33 @@ | |||
83 | .Fa "const char *type" | 87 | .Fa "const char *type" |
84 | .Fa "const char *value" | 88 | .Fa "const char *value" |
85 | .Fc | 89 | .Fc |
86 | .In openssl/rsa.h | ||
87 | .Ft int | 90 | .Ft int |
88 | .Fo EVP_PKEY_CTX_set_signature_md | 91 | .Fo EVP_PKEY_CTX_set_signature_md |
89 | .Fa "EVP_PKEY_CTX *ctx" | 92 | .Fa "EVP_PKEY_CTX *ctx" |
90 | .Fa "const EVP_MD *md" | 93 | .Fa "const EVP_MD *md" |
91 | .Fc | 94 | .Fc |
95 | .In openssl/rsa.h | ||
92 | .Ft int | 96 | .Ft int |
93 | .Fo EVP_PKEY_CTX_set_rsa_padding | 97 | .Fo EVP_PKEY_CTX_set_rsa_padding |
94 | .Fa "EVP_PKEY_CTX *ctx" | 98 | .Fa "EVP_PKEY_CTX *ctx" |
95 | .Fa "int pad" | 99 | .Fa "int pad" |
96 | .Fc | 100 | .Fc |
97 | .Ft int | 101 | .Ft int |
102 | .Fo EVP_PKEY_CTX_get_rsa_padding | ||
103 | .Fa "EVP_PKEY_CTX *ctx" | ||
104 | .Fa "int *ppad" | ||
105 | .Fc | ||
106 | .Ft int | ||
98 | .Fo EVP_PKEY_CTX_set_rsa_pss_saltlen | 107 | .Fo EVP_PKEY_CTX_set_rsa_pss_saltlen |
99 | .Fa "EVP_PKEY_CTX *ctx" | 108 | .Fa "EVP_PKEY_CTX *ctx" |
100 | .Fa "int len" | 109 | .Fa "int len" |
101 | .Fc | 110 | .Fc |
102 | .Ft int | 111 | .Ft int |
112 | .Fo EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
113 | .Fa "EVP_PKEY_CTX *ctx" | ||
114 | .Fa "int *plen" | ||
115 | .Fc | ||
116 | .Ft int | ||
103 | .Fo EVP_PKEY_CTX_set_rsa_keygen_bits | 117 | .Fo EVP_PKEY_CTX_set_rsa_keygen_bits |
104 | .Fa "EVP_PKEY_CTX *ctx" | 118 | .Fa "EVP_PKEY_CTX *ctx" |
105 | .Fa "int mbits" | 119 | .Fa "int mbits" |
@@ -109,6 +123,16 @@ | |||
109 | .Fa "EVP_PKEY_CTX *ctx" | 123 | .Fa "EVP_PKEY_CTX *ctx" |
110 | .Fa "BIGNUM *pubexp" | 124 | .Fa "BIGNUM *pubexp" |
111 | .Fc | 125 | .Fc |
126 | .Ft int | ||
127 | .Fo EVP_PKEY_CTX_set_rsa_mgf1_md | ||
128 | .Fa "EVP_PKEY_CTX *ctx" | ||
129 | .Fa "const EVP_MD *md" | ||
130 | .Fc | ||
131 | .Ft int | ||
132 | .Fo EVP_PKEY_CTX_get_rsa_mgf1_md | ||
133 | .Fa "EVP_PKEY_CTX *ctx" | ||
134 | .Fa "const EVP_MD **pmd" | ||
135 | .Fc | ||
112 | .In openssl/dsa.h | 136 | .In openssl/dsa.h |
113 | .Ft int | 137 | .Ft int |
114 | .Fo EVP_PKEY_CTX_set_dsa_paramgen_bits | 138 | .Fo EVP_PKEY_CTX_set_dsa_paramgen_bits |
@@ -179,12 +203,11 @@ All the remaining "functions" are implemented as macros. | |||
179 | The | 203 | The |
180 | .Fn EVP_PKEY_CTX_set_signature_md | 204 | .Fn EVP_PKEY_CTX_set_signature_md |
181 | macro sets the message digest type used in a signature. | 205 | macro sets the message digest type used in a signature. |
182 | It can be used with any public key algorithm supporting signature | 206 | It can be used with the RSA, DSA, and ECDSA algorithms. |
183 | operations. | 207 | .Ss RSA parameters |
184 | .Pp | 208 | The |
185 | The macro | ||
186 | .Fn EVP_PKEY_CTX_set_rsa_padding | 209 | .Fn EVP_PKEY_CTX_set_rsa_padding |
187 | sets the RSA padding mode for | 210 | macro sets the RSA padding mode for |
188 | .Fa ctx . | 211 | .Fa ctx . |
189 | The | 212 | The |
190 | .Fa pad | 213 | .Fa pad |
@@ -216,6 +239,11 @@ If it is not called then the first byte of the plaintext buffer is | |||
216 | expected to be the algorithm identifier byte. | 239 | expected to be the algorithm identifier byte. |
217 | .Pp | 240 | .Pp |
218 | The | 241 | The |
242 | .Fn EVP_PKEY_CTX_get_rsa_padding | ||
243 | macro retrieves the RSA padding mode for | ||
244 | .Fa ctx . | ||
245 | .Pp | ||
246 | The | ||
219 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen | 247 | .Fn EVP_PKEY_CTX_set_rsa_pss_saltlen |
220 | macro sets the RSA PSS salt length to | 248 | macro sets the RSA PSS salt length to |
221 | .Fa len . | 249 | .Fa len . |
@@ -229,6 +257,13 @@ If this macro is not called a salt length value of -2 is used by | |||
229 | default. | 257 | default. |
230 | .Pp | 258 | .Pp |
231 | The | 259 | The |
260 | .Fn EVP_PKEY_CTX_get_rsa_pss_saltlen | ||
261 | macro retrieves the RSA PSS salt length for | ||
262 | .Fa ctx . | ||
263 | The padding mode must have been set to | ||
264 | .Dv RSA_PKCS1_PSS_PADDING . | ||
265 | .Pp | ||
266 | The | ||
232 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits | 267 | .Fn EVP_PKEY_CTX_set_rsa_keygen_bits |
233 | macro sets the RSA key length for RSA key generation to | 268 | macro sets the RSA key length for RSA key generation to |
234 | .Fa mbits . | 269 | .Fa mbits . |
@@ -245,17 +280,38 @@ pointer is used internally by this function, so it should not be modified | |||
245 | or freed after the call. | 280 | or freed after the call. |
246 | If this macro is not called, then 65537 is used. | 281 | If this macro is not called, then 65537 is used. |
247 | .Pp | 282 | .Pp |
283 | The | ||
284 | .Fn EVP_PKEY_CTX_set_rsa_mgf1_md | ||
285 | macro sets the MGF1 digest for RSA padding schemes to | ||
286 | .Fa md . | ||
287 | Unless explicitly specified, the signing digest is used. | ||
288 | The padding mode must have been set to | ||
289 | .Dv RSA_PKCS1_OAEP_PADDING | ||
290 | or | ||
291 | .Dv RSA_PKCS1_PSS_PADDING . | ||
292 | .Pp | ||
293 | The | ||
294 | .Fn EVP_PKEY_CTX_get_rsa_mgf1_md | ||
295 | macro retrieves the MGF1 digest for | ||
296 | .Fa ctx . | ||
297 | Unless explicitly specified, the signing digest is used. | ||
298 | The padding mode must have been set to | ||
299 | .Dv RSA_PKCS1_OAEP_PADDING | ||
300 | or | ||
301 | .Dv RSA_PKCS1_PSS_PADDING . | ||
302 | .Ss DSA parameters | ||
248 | The macro | 303 | The macro |
249 | .Fn EVP_PKEY_CTX_set_dsa_paramgen_bits | 304 | .Fn EVP_PKEY_CTX_set_dsa_paramgen_bits |
250 | sets the number of bits used for DSA parameter generation to | 305 | sets the number of bits used for DSA parameter generation to |
251 | .Fa nbits . | 306 | .Fa nbits . |
252 | If not specified, 1024 is used. | 307 | If not specified, 1024 is used. |
253 | .Pp | 308 | .Ss DH parameters |
254 | The macro | 309 | The macro |
255 | .Fn EVP_PKEY_CTX_set_dh_paramgen_prime_len | 310 | .Fn EVP_PKEY_CTX_set_dh_paramgen_prime_len |
256 | sets the length of the DH prime parameter | 311 | sets the length of the DH prime parameter |
257 | .Fa len | 312 | .Fa len |
258 | for DH parameter generation. | 313 | for DH parameter generation. |
314 | It only accepts lengths greater than or equal to 256. | ||
259 | If this macro is not called, then 1024 is used. | 315 | If this macro is not called, then 1024 is used. |
260 | .Pp | 316 | .Pp |
261 | The | 317 | The |
@@ -264,7 +320,7 @@ macro sets DH generator to | |||
264 | .Fa gen | 320 | .Fa gen |
265 | for DH parameter generation. | 321 | for DH parameter generation. |
266 | If not specified, 2 is used. | 322 | If not specified, 2 is used. |
267 | .Pp | 323 | .Ss EC parameters |
268 | The | 324 | The |
269 | .Fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid | 325 | .Fn EVP_PKEY_CTX_set_ec_paramgen_curve_nid |
270 | sets the EC curve for EC parameter generation to | 326 | sets the EC curve for EC parameter generation to |