summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2019-10-29 17:21:07 +0000
committerschwarze <>2019-10-29 17:21:07 +0000
commit490353a1e0fab7743f3e5af338e6501c2a79dbfb (patch)
treefb3976b1a13ede479f314a16742c21f3983d552d /src/lib
parentc1b9b236a43fcf82d1bda4b05815e681f57b23e3 (diff)
downloadopenbsd-490353a1e0fab7743f3e5af338e6501c2a79dbfb.tar.gz
openbsd-490353a1e0fab7743f3e5af338e6501c2a79dbfb.tar.bz2
openbsd-490353a1e0fab7743f3e5af338e6501c2a79dbfb.zip
merge documentation for EVP_PKEY_CTX_set1_id(3), EVP_PKEY_CTX_get1_id(3),
and EVP_PKEY_CTX_get1_id_len(3), but make it sound more like English text; from Paul Yang via OpenSSL commit f922dac8 Sep 6 10:36:11 2018 +0800 from the OpenSSL 1.1.1 branch, which is still under a free license
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.359
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
172The function 191The 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.
350The encoding can be set to 0 for explicit parameters or to 369The encoding can be set to 0 for explicit parameters or to
351.Dv OPENSSL_EC_NAMED_CURVE 370.Dv OPENSSL_EC_NAMED_CURVE
352to use named curve form. 371to use named curve form.
372.Ss Other parameters
373The
374.Fn EVP_PKEY_CTX_set1_id ,
375.Fn EVP_PKEY_CTX_get1_id ,
376and
377.Fn EVP_PKEY_CTX_get1_id_len
378macros manipulate a special identifier field used for some specific
379signature algorithms such as SM2.
380The
381.Fn EVP_PKEY_set1_id
382macro sets the ID to a copy of
383.Fa id
384with the length
385.Fa id_len .
386The caller can safely free the original memory pointed to by
387.Fa id .
388The
389.Fn EVP_PKEY_CTX_get1_id_len
390macro returns the length of the ID set via a previous call to
391.Fn EVP_PKEY_set1_id .
392That length is typically used to allocate memory for a subsequent call to
393.Fn EVP_PKEY_CTX_get1_id ,
394which copies the previously set ID into
395.Pf * Fa id .
396The caller is responsible for allocating sufficient memory for
397.Fa id
398before 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
355and its macros return a positive value for success and 0 or a negative 402and 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
402first appeared in OpenSSL 1.0.2 and have been available since 449first appeared in OpenSSL 1.0.2 and have been available since
403.Ox 6.6 . 450.Ox 6.6 .
451.Pp
452The functions
453.Fn EVP_PKEY_CTX_set1_id ,
454.Fn EVP_PKEY_CTX_get1_id ,
455and
456.Fn EVP_PKEY_CTX_get1_id_len
457first appeared in OpenSSL 1.1.1 and have been available since
458.Ox 6.6 .