summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2017-01-04 21:14:26 +0000
committerschwarze <>2017-01-04 21:14:26 +0000
commitbfe71f5dce48e5921bc77ce6a2304baa4d005aaf (patch)
tree44332ce82f2277a06dd2f2cff71a31615270a84f
parent227f8ccffa79526ba4badd39d3286d37bc91eaf8 (diff)
downloadopenbsd-bfe71f5dce48e5921bc77ce6a2304baa4d005aaf.tar.gz
openbsd-bfe71f5dce48e5921bc77ce6a2304baa4d005aaf.tar.bz2
openbsd-bfe71f5dce48e5921bc77ce6a2304baa4d005aaf.zip
Write new d2i_ASN1_SEQUENCE_ANY(3) manual page from scratch.
All four functions are listed in <openssl/asn1.h> and in OpenSSL doc/man3/d2i_X509.pod. Note that in the OpenSSL documentation, three of the four prototypes are incorrect.
-rw-r--r--src/lib/libcrypto/man/Makefile3
-rw-r--r--src/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.385
2 files changed, 87 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index c6443f3e3f..0654dde9c0 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.109 2016/12/29 17:42:54 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.110 2017/01/04 21:14:26 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -229,6 +229,7 @@ MAN= \
229 crypto.3 \ 229 crypto.3 \
230 d2i_ASN1_NULL.3 \ 230 d2i_ASN1_NULL.3 \
231 d2i_ASN1_OBJECT.3 \ 231 d2i_ASN1_OBJECT.3 \
232 d2i_ASN1_SEQUENCE_ANY.3 \
232 d2i_AUTHORITY_KEYID.3 \ 233 d2i_AUTHORITY_KEYID.3 \
233 d2i_BASIC_CONSTRAINTS.3 \ 234 d2i_BASIC_CONSTRAINTS.3 \
234 d2i_DHparams.3 \ 235 d2i_DHparams.3 \
diff --git a/src/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3 b/src/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3
new file mode 100644
index 0000000000..f3ab6d98b5
--- /dev/null
+++ b/src/lib/libcrypto/man/d2i_ASN1_SEQUENCE_ANY.3
@@ -0,0 +1,85 @@
1.\" $OpenBSD: d2i_ASN1_SEQUENCE_ANY.3,v 1.1 2017/01/04 21:14:26 schwarze Exp $
2.\"
3.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: January 4 2017 $
18.Dt D2I_ASN1_SEQUENCE_ANY 3
19.Os
20.Sh NAME
21.Nm d2i_ASN1_SEQUENCE_ANY ,
22.Nm i2d_ASN1_SEQUENCE_ANY ,
23.Nm d2i_ASN1_SET_ANY ,
24.Nm i2d_ASN1_SET_ANY
25.Nd decode and encode ASN.1 sequences and sets
26.Sh SYNOPSIS
27.In openssl/asn1.h
28.Ft ASN1_SEQUENCE_ANY *
29.Fo d2i_ASN1_SEQUENCE_ANY
30.Fa "ASN1_SEQUENCE_ANY **val_out"
31.Fa "const unsigned char **der_in"
32.Fa "long length"
33.Fc
34.Ft int
35.Fo i2d_ASN1_SEQUENCE_ANY
36.Fa "const ASN1_SEQUENCE_ANY *val_in"
37.Fa "unsigned char **der_out"
38.Fc
39.Ft ASN1_SEQUENCE_ANY *
40.Fo d2i_ASN1_SET_ANY
41.Fa "ASN1_SEQUENCE_ANY **val_out"
42.Fa "const unsigned char **der_in"
43.Fa "long length"
44.Fc
45.Ft int
46.Fo i2d_ASN1_SET_ANY
47.Fa "const ASN1_SEQUENCE_ANY *val_in"
48.Fa "unsigned char **der_out"
49.Fc
50.Sh DESCRIPTION
51These functions decode and encode ASN.1 sequences and sets.
52For details about the semantics, examples, caveats, and bugs, see
53.Xr ASN1_item_d2i 3 .
54.Pp
55The type
56.Vt ASN1_SEQUENCE_ANY
57is defined as
58.Vt STACK_OF(ASN1_TYPE) .
59Whether such an object represents a sequence or a set is not stored
60in the object itself but needs to be remembered separately.
61.Pp
62Like for
63.Xr d2i_ASN1_TYPE 3
64and
65.Xr i2d_ASN1_TYPE 3 ,
66the type of the individual values contained in the sequence or set
67is not specified when calling the functions.
68It might vary among the members, and it is stored together with
69each value in each
70.Vt ASN1_TYPE
71object contained in the sequence or set.
72.Sh RETURN VALUES
73.Fn d2i_ASN1_SEQUENCE_ANY
74returns an
75.Vt ASN1_SEQUENCE_ANY
76object or
77.Dv NULL
78if an error occurs.
79.Pp
80.Fn i2d_ASN1_SEQUENCE_ANY
81returns the number of bytes written or a negative value if an error
82occurs.
83.Sh SEE ALSO
84.Xr ASN1_item_d2i 3 ,
85.Xr ASN1_TYPE_new 3