summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2019-08-25 14:11:41 +0000
committerschwarze <>2019-08-25 14:11:41 +0000
commit4bf8254bc8628da12fe6bac713db9c38df203855 (patch)
tree5e812986590c50571a252888e9ab2f3f8f149d5d /src
parent20f757bede386dce1246a4665dface64db55df5e (diff)
downloadopenbsd-4bf8254bc8628da12fe6bac713db9c38df203855.tar.gz
openbsd-4bf8254bc8628da12fe6bac713db9c38df203855.tar.bz2
openbsd-4bf8254bc8628da12fe6bac713db9c38df203855.zip
Correctly document the return values of i2d_ECDSA_SIG(3) and
d2i_ECDSA_SIG(3); triggered by OpenSSL commit da4ea0cf Aug 5 16:13:24 2019 +0100, but solved differently. While here, adjust argument placeholders and wording to our usual conventions, and don't try to reiterate the complicated contents of ASN1_item_d2i(3) here.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/ECDSA_SIG_new.353
1 files changed, 28 insertions, 25 deletions
diff --git a/src/lib/libcrypto/man/ECDSA_SIG_new.3 b/src/lib/libcrypto/man/ECDSA_SIG_new.3
index f2ce4bf26c..72802155b0 100644
--- a/src/lib/libcrypto/man/ECDSA_SIG_new.3
+++ b/src/lib/libcrypto/man/ECDSA_SIG_new.3
@@ -1,6 +1,6 @@
1.\" $OpenBSD: ECDSA_SIG_new.3,v 1.14 2019/08/16 16:15:50 schwarze Exp $ 1.\" $OpenBSD: ECDSA_SIG_new.3,v 1.15 2019/08/25 14:11:41 schwarze Exp $
2.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100 2.\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100
3.\" selective merge up to: OpenSSL 6da34cfb Jun 2 16:17:32 2018 -0400 3.\" selective merge up to: OpenSSL da4ea0cf Aug 5 16:13:24 2019 +0100
4.\" 4.\"
5.\" This file was written by Nils Larsch <nils@openssl.org>. 5.\" This file was written by Nils Larsch <nils@openssl.org>.
6.\" Copyright (c) 2004, 2005, 2013, 2016 The OpenSSL Project. 6.\" Copyright (c) 2004, 2005, 2013, 2016 The OpenSSL Project.
@@ -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: August 16 2019 $ 53.Dd $Mdocdate: August 25 2019 $
54.Dt ECDSA_SIG_NEW 3 54.Dt ECDSA_SIG_NEW 3
55.Os 55.Os
56.Sh NAME 56.Sh NAME
@@ -97,13 +97,13 @@
97.Fc 97.Fc
98.Ft int 98.Ft int
99.Fo i2d_ECDSA_SIG 99.Fo i2d_ECDSA_SIG
100.Fa "const ECDSA_SIG *sig" 100.Fa "const ECDSA_SIG *sig_in"
101.Fa "unsigned char **pp" 101.Fa "unsigned char **der_out"
102.Fc 102.Fc
103.Ft ECDSA_SIG* 103.Ft ECDSA_SIG*
104.Fo d2i_ECDSA_SIG 104.Fo d2i_ECDSA_SIG
105.Fa "ECDSA_SIG **sig" 105.Fa "ECDSA_SIG **sig_out"
106.Fa "const unsigned char **pp" 106.Fa "const unsigned char **der_in"
107.Fa "long len" 107.Fa "long len"
108.Fc 108.Fc
109.Ft int 109.Ft int
@@ -247,26 +247,18 @@ should not be freed by the caller.
247.Pp 247.Pp
248.Fn i2d_ECDSA_SIG 248.Fn i2d_ECDSA_SIG
249creates the DER encoding of the ECDSA signature 249creates the DER encoding of the ECDSA signature
250.Fa sig 250.Fa sig_in
251and writes the encoded signature to 251and writes the encoded signature to
252.Fa *pp 252.Pf * Fa der_out .
253(note: if
254.Fa pp
255is
256.Dv NULL ,
257.Fn i2d_ECDSA_SIG
258returns the expected length in bytes of the DER-encoded signature).
259.Fn i2d_ECDSA_SIG
260returns the length of the DER-encoded signature (or 0 on error).
261.Pp
262.Fn d2i_ECDSA_SIG 253.Fn d2i_ECDSA_SIG
263decodes a DER-encoded ECDSA signature and returns the decoded signature 254decodes the DER-encoded signature stored in the buffer
264in a newly allocated 255.Pf * Fa der_in
265.Vt ECDSA_SIG 256which is
266structure. 257.Fa len
267.Fa *sig 258bytes long into
268points to the buffer containing the DER-encoded signature of size 259.Pf * Fa sig_out .
269.Fa len . 260For details about the semantics, examples, caveats, and bugs, see
261.Xr ASN1_item_d2i 3 .
270.Pp 262.Pp
271.Fn ECDSA_size 263.Fn ECDSA_size
272returns the maximum length of a DER-encoded ECDSA signature created with 264returns the maximum length of a DER-encoded ECDSA signature created with
@@ -384,6 +376,17 @@ object or
384.Dv NULL 376.Dv NULL
385if an error occurs. 377if an error occurs.
386.Pp 378.Pp
379.Fn i2d_ECDSA_SIG
380returns the number of bytes successfully encoded
381or a negative value if an error occurs.
382.Pp
383.Fn d2i_ECDSA_SIG
384returns a pointer to the decoded
385.Vt ECDSA_SIG
386structure or
387.Dv NULL
388if an error occurs.
389.Pp
387.Fn ECDSA_size 390.Fn ECDSA_size
388returns the maximum length signature or 0 on error. 391returns the maximum length signature or 0 on error.
389.Pp 392.Pp