diff options
author | schwarze <> | 2019-08-25 14:11:41 +0000 |
---|---|---|
committer | schwarze <> | 2019-08-25 14:11:41 +0000 |
commit | 4bf8254bc8628da12fe6bac713db9c38df203855 (patch) | |
tree | 5e812986590c50571a252888e9ab2f3f8f149d5d /src | |
parent | 20f757bede386dce1246a4665dface64db55df5e (diff) | |
download | openbsd-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.3 | 53 |
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 |
249 | creates the DER encoding of the ECDSA signature | 249 | creates the DER encoding of the ECDSA signature |
250 | .Fa sig | 250 | .Fa sig_in |
251 | and writes the encoded signature to | 251 | and writes the encoded signature to |
252 | .Fa *pp | 252 | .Pf * Fa der_out . |
253 | (note: if | ||
254 | .Fa pp | ||
255 | is | ||
256 | .Dv NULL , | ||
257 | .Fn i2d_ECDSA_SIG | ||
258 | returns the expected length in bytes of the DER-encoded signature). | ||
259 | .Fn i2d_ECDSA_SIG | ||
260 | returns the length of the DER-encoded signature (or 0 on error). | ||
261 | .Pp | ||
262 | .Fn d2i_ECDSA_SIG | 253 | .Fn d2i_ECDSA_SIG |
263 | decodes a DER-encoded ECDSA signature and returns the decoded signature | 254 | decodes the DER-encoded signature stored in the buffer |
264 | in a newly allocated | 255 | .Pf * Fa der_in |
265 | .Vt ECDSA_SIG | 256 | which is |
266 | structure. | 257 | .Fa len |
267 | .Fa *sig | 258 | bytes long into |
268 | points to the buffer containing the DER-encoded signature of size | 259 | .Pf * Fa sig_out . |
269 | .Fa len . | 260 | For 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 |
272 | returns the maximum length of a DER-encoded ECDSA signature created with | 264 | returns the maximum length of a DER-encoded ECDSA signature created with |
@@ -384,6 +376,17 @@ object or | |||
384 | .Dv NULL | 376 | .Dv NULL |
385 | if an error occurs. | 377 | if an error occurs. |
386 | .Pp | 378 | .Pp |
379 | .Fn i2d_ECDSA_SIG | ||
380 | returns the number of bytes successfully encoded | ||
381 | or a negative value if an error occurs. | ||
382 | .Pp | ||
383 | .Fn d2i_ECDSA_SIG | ||
384 | returns a pointer to the decoded | ||
385 | .Vt ECDSA_SIG | ||
386 | structure or | ||
387 | .Dv NULL | ||
388 | if an error occurs. | ||
389 | .Pp | ||
387 | .Fn ECDSA_size | 390 | .Fn ECDSA_size |
388 | returns the maximum length signature or 0 on error. | 391 | returns the maximum length signature or 0 on error. |
389 | .Pp | 392 | .Pp |