diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 index b96d37b0af..1805a9283d 100644 --- a/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 +++ b/src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.16 2019/10/29 16:33:27 schwarze Exp $ | 1 | .\" $OpenBSD: EVP_PKEY_CTX_ctrl.3,v 1.17 2019/10/29 17:21:07 schwarze Exp $ |
2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | 3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 |
4 | .\" | 4 | .\" |
@@ -70,7 +70,10 @@ | |||
70 | .Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len , | 70 | .Nm EVP_PKEY_CTX_set_dh_paramgen_prime_len , |
71 | .Nm EVP_PKEY_CTX_set_dh_paramgen_generator , | 71 | .Nm EVP_PKEY_CTX_set_dh_paramgen_generator , |
72 | .Nm EVP_PKEY_CTX_set_ec_paramgen_curve_nid , | 72 | .Nm EVP_PKEY_CTX_set_ec_paramgen_curve_nid , |
73 | .Nm EVP_PKEY_CTX_set_ec_param_enc | 73 | .Nm EVP_PKEY_CTX_set_ec_param_enc , |
74 | .Nm EVP_PKEY_CTX_set1_id , | ||
75 | .Nm EVP_PKEY_CTX_get1_id , | ||
76 | .Nm EVP_PKEY_CTX_get1_id_len | ||
74 | .Nd algorithm specific control operations | 77 | .Nd algorithm specific control operations |
75 | .Sh SYNOPSIS | 78 | .Sh SYNOPSIS |
76 | .In openssl/evp.h | 79 | .In openssl/evp.h |
@@ -168,6 +171,22 @@ | |||
168 | .Fa "EVP_PKEY_CTX *ctx" | 171 | .Fa "EVP_PKEY_CTX *ctx" |
169 | .Fa "int param_enc" | 172 | .Fa "int param_enc" |
170 | .Fc | 173 | .Fc |
174 | .Ft int | ||
175 | .Fo EVP_PKEY_CTX_set1_id | ||
176 | .Fa "EVP_PKEY_CTX *ctx" | ||
177 | .Fa "void *id" | ||
178 | .Fa "size_t id_len" | ||
179 | .Fc | ||
180 | .Ft int | ||
181 | .Fo EVP_PKEY_CTX_get1_id | ||
182 | .Fa "EVP_PKEY_CTX *ctx" | ||
183 | .Fa "void *id" | ||
184 | .Fc | ||
185 | .Ft int | ||
186 | .Fo EVP_PKEY_CTX_get1_id_len | ||
187 | .Fa "EVP_PKEY_CTX *ctx" | ||
188 | .Fa "size_t *pid_len" | ||
189 | .Fc | ||
171 | .Sh DESCRIPTION | 190 | .Sh DESCRIPTION |
172 | The function | 191 | The function |
173 | .Fn EVP_PKEY_CTX_ctrl | 192 | .Fn EVP_PKEY_CTX_ctrl |
@@ -350,6 +369,34 @@ when generating EC parameters or an EC key. | |||
350 | The encoding can be set to 0 for explicit parameters or to | 369 | The encoding can be set to 0 for explicit parameters or to |
351 | .Dv OPENSSL_EC_NAMED_CURVE | 370 | .Dv OPENSSL_EC_NAMED_CURVE |
352 | to use named curve form. | 371 | to use named curve form. |
372 | .Ss Other parameters | ||
373 | The | ||
374 | .Fn EVP_PKEY_CTX_set1_id , | ||
375 | .Fn EVP_PKEY_CTX_get1_id , | ||
376 | and | ||
377 | .Fn EVP_PKEY_CTX_get1_id_len | ||
378 | macros manipulate a special identifier field used for some specific | ||
379 | signature algorithms such as SM2. | ||
380 | The | ||
381 | .Fn EVP_PKEY_set1_id | ||
382 | macro sets the ID to a copy of | ||
383 | .Fa id | ||
384 | with the length | ||
385 | .Fa id_len . | ||
386 | The caller can safely free the original memory pointed to by | ||
387 | .Fa id . | ||
388 | The | ||
389 | .Fn EVP_PKEY_CTX_get1_id_len | ||
390 | macro returns the length of the ID set via a previous call to | ||
391 | .Fn EVP_PKEY_set1_id . | ||
392 | That length is typically used to allocate memory for a subsequent call to | ||
393 | .Fn EVP_PKEY_CTX_get1_id , | ||
394 | which copies the previously set ID into | ||
395 | .Pf * Fa id . | ||
396 | The caller is responsible for allocating sufficient memory for | ||
397 | .Fa id | ||
398 | before calling | ||
399 | .Fn EVP_PKEY_CTX_get1_id . | ||
353 | .Sh RETURN VALUES | 400 | .Sh RETURN VALUES |
354 | .Fn EVP_PKEY_CTX_ctrl | 401 | .Fn EVP_PKEY_CTX_ctrl |
355 | and its macros return a positive value for success and 0 or a negative | 402 | and its macros return a positive value for success and 0 or a negative |
@@ -401,3 +448,11 @@ and | |||
401 | .Fn EVP_PKEY_CTX_set_ec_param_enc | 448 | .Fn EVP_PKEY_CTX_set_ec_param_enc |
402 | first appeared in OpenSSL 1.0.2 and have been available since | 449 | first appeared in OpenSSL 1.0.2 and have been available since |
403 | .Ox 6.6 . | 450 | .Ox 6.6 . |
451 | .Pp | ||
452 | The functions | ||
453 | .Fn EVP_PKEY_CTX_set1_id , | ||
454 | .Fn EVP_PKEY_CTX_get1_id , | ||
455 | and | ||
456 | .Fn EVP_PKEY_CTX_get1_id_len | ||
457 | first appeared in OpenSSL 1.1.1 and have been available since | ||
458 | .Ox 6.6 . | ||