diff options
author | schwarze <> | 2016-12-28 13:45:30 +0000 |
---|---|---|
committer | schwarze <> | 2016-12-28 13:45:30 +0000 |
commit | a422a45452769d10a4d4249e8e8f1d7561972dd0 (patch) | |
tree | df67c0911826cf2d3c000c66573ba6c593cdb4d6 /src | |
parent | 5e926ce5fdd4f8d00af1b900cd2835721480d336 (diff) | |
download | openbsd-a422a45452769d10a4d4249e8e8f1d7561972dd0.tar.gz openbsd-a422a45452769d10a4d4249e8e8f1d7561972dd0.tar.bz2 openbsd-a422a45452769d10a4d4249e8e8f1d7561972dd0.zip |
Write new manual pages d2i_X509_ATTRIBUTE(3) and d2i_X509_EXTENSION(3)
from scratch. All six functions are listed in <openssl/x509.h>
and in OpenSSL doc/man3/d2i_X509.pod.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509V3_get_d2i.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_EXTENSION_set_object.3 | 7 | ||||
-rw-r--r-- | src/lib/libcrypto/man/d2i_X509_ATTRIBUTE.3 | 70 | ||||
-rw-r--r-- | src/lib/libcrypto/man/d2i_X509_EXTENSION.3 | 92 |
6 files changed, 176 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index b9a647c38e..49990dff8d 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.106 2016/12/28 00:55:05 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.107 2016/12/28 13:45:30 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -243,7 +243,9 @@ MAN= \ | |||
243 | d2i_TS_REQ.3 \ | 243 | d2i_TS_REQ.3 \ |
244 | d2i_X509.3 \ | 244 | d2i_X509.3 \ |
245 | d2i_X509_ALGOR.3 \ | 245 | d2i_X509_ALGOR.3 \ |
246 | d2i_X509_ATTRIBUTE.3 \ | ||
246 | d2i_X509_CRL.3 \ | 247 | d2i_X509_CRL.3 \ |
248 | d2i_X509_EXTENSION.3 \ | ||
247 | d2i_X509_NAME.3 \ | 249 | d2i_X509_NAME.3 \ |
248 | d2i_X509_REQ.3 \ | 250 | d2i_X509_REQ.3 \ |
249 | d2i_X509_SIG.3 \ | 251 | d2i_X509_SIG.3 \ |
diff --git a/src/lib/libcrypto/man/X509V3_get_d2i.3 b/src/lib/libcrypto/man/X509V3_get_d2i.3 index e7c0abea89..a0edc89934 100644 --- a/src/lib/libcrypto/man/X509V3_get_d2i.3 +++ b/src/lib/libcrypto/man/X509V3_get_d2i.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509V3_get_d2i.3,v 1.4 2016/12/15 15:21:07 schwarze Exp $ | 1 | .\" $OpenBSD: X509V3_get_d2i.3,v 1.5 2016/12/28 13:45:30 schwarze Exp $ |
2 | .\" OpenSSL 047dd81e Jul 4 23:03:17 2014 +0100 | 2 | .\" OpenSSL 047dd81e Jul 4 23:03:17 2014 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: December 15 2016 $ | 51 | .Dd $Mdocdate: December 28 2016 $ |
52 | .Dt X509V3_GET_D2I 3 | 52 | .Dt X509V3_GET_D2I 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -365,6 +365,7 @@ non-fatal error (extension not found, already exists, cannot be encoded), | |||
365 | or -1 due to a fatal error such as a memory allocation failure. | 365 | or -1 due to a fatal error such as a memory allocation failure. |
366 | .Sh SEE ALSO | 366 | .Sh SEE ALSO |
367 | .Xr d2i_X509 3 , | 367 | .Xr d2i_X509 3 , |
368 | .Xr d2i_X509_EXTENSION 3 , | ||
368 | .Xr ERR_get_error 3 , | 369 | .Xr ERR_get_error 3 , |
369 | .Xr X509_CRL_get0_by_serial 3 , | 370 | .Xr X509_CRL_get0_by_serial 3 , |
370 | .Xr X509_EXTENSION_new 3 , | 371 | .Xr X509_EXTENSION_new 3 , |
diff --git a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 index 49aa238da7..f0568e196d 100644 --- a/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 +++ b/src/lib/libcrypto/man/X509_ATTRIBUTE_new.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.2 2016/12/22 16:05:22 schwarze Exp $ | 1 | .\" $OpenBSD: X509_ATTRIBUTE_new.3,v 1.3 2016/12/28 13:45:30 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
4 | .\" | 4 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: December 22 2016 $ | 17 | .Dd $Mdocdate: December 28 2016 $ |
18 | .Dt X509_ATTRIBUTE_NEW 3 | 18 | .Dt X509_ATTRIBUTE_NEW 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -61,6 +61,7 @@ object or | |||
61 | .Dv NULL | 61 | .Dv NULL |
62 | if an error occurs. | 62 | if an error occurs. |
63 | .Sh SEE ALSO | 63 | .Sh SEE ALSO |
64 | .Xr d2i_X509_ATTRIBUTE 3 , | ||
64 | .Xr PKCS12_SAFEBAG_new 3 , | 65 | .Xr PKCS12_SAFEBAG_new 3 , |
65 | .Xr PKCS8_PRIV_KEY_INFO_new 3 , | 66 | .Xr PKCS8_PRIV_KEY_INFO_new 3 , |
66 | .Xr X509_EXTENSION_new 3 , | 67 | .Xr X509_EXTENSION_new 3 , |
diff --git a/src/lib/libcrypto/man/X509_EXTENSION_set_object.3 b/src/lib/libcrypto/man/X509_EXTENSION_set_object.3 index 850be6e66b..f0df3392b8 100644 --- a/src/lib/libcrypto/man/X509_EXTENSION_set_object.3 +++ b/src/lib/libcrypto/man/X509_EXTENSION_set_object.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_EXTENSION_set_object.3,v 1.5 2016/12/25 22:15:10 schwarze Exp $ | 1 | .\" $OpenBSD: X509_EXTENSION_set_object.3,v 1.6 2016/12/28 13:45:30 schwarze Exp $ |
2 | .\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400 | 2 | .\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400 |
3 | .\" | 3 | .\" |
4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. |
@@ -65,7 +65,7 @@ | |||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
67 | .\" | 67 | .\" |
68 | .Dd $Mdocdate: December 25 2016 $ | 68 | .Dd $Mdocdate: December 28 2016 $ |
69 | .Dt X509_EXTENSION_SET_OBJECT 3 | 69 | .Dt X509_EXTENSION_SET_OBJECT 3 |
70 | .Os | 70 | .Os |
71 | .Sh NAME | 71 | .Sh NAME |
@@ -79,6 +79,8 @@ | |||
79 | .Nm X509_EXTENSION_get_object , | 79 | .Nm X509_EXTENSION_get_object , |
80 | .Nm X509_EXTENSION_get_critical , | 80 | .Nm X509_EXTENSION_get_critical , |
81 | .Nm X509_EXTENSION_get_data | 81 | .Nm X509_EXTENSION_get_data |
82 | .\" In the next line, the capital "E" is not a typo. | ||
83 | .\" The ASN.1 structure is called "Extension", not "extension". | ||
82 | .Nd create, change, and inspect X.509 Extension objects | 84 | .Nd create, change, and inspect X.509 Extension objects |
83 | .Sh SYNOPSIS | 85 | .Sh SYNOPSIS |
84 | .In openssl/x509.h | 86 | .In openssl/x509.h |
@@ -269,6 +271,7 @@ pointer. | |||
269 | .Xr ACCESS_DESCRIPTION_new 3 , | 271 | .Xr ACCESS_DESCRIPTION_new 3 , |
270 | .Xr AUTHORITY_KEYID_new 3 , | 272 | .Xr AUTHORITY_KEYID_new 3 , |
271 | .Xr BASIC_CONSTRAINTS_new 3 , | 273 | .Xr BASIC_CONSTRAINTS_new 3 , |
274 | .Xr d2i_X509_EXTENSION 3 , | ||
272 | .Xr DIST_POINT_new 3 , | 275 | .Xr DIST_POINT_new 3 , |
273 | .Xr EXTENDED_KEY_USAGE_new 3 , | 276 | .Xr EXTENDED_KEY_USAGE_new 3 , |
274 | .Xr NAME_CONSTRAINTS_new 3 , | 277 | .Xr NAME_CONSTRAINTS_new 3 , |
diff --git a/src/lib/libcrypto/man/d2i_X509_ATTRIBUTE.3 b/src/lib/libcrypto/man/d2i_X509_ATTRIBUTE.3 new file mode 100644 index 0000000000..c8a17571e2 --- /dev/null +++ b/src/lib/libcrypto/man/d2i_X509_ATTRIBUTE.3 | |||
@@ -0,0 +1,70 @@ | |||
1 | .\" $OpenBSD: d2i_X509_ATTRIBUTE.3,v 1.1 2016/12/28 13:45:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 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: December 28 2016 $ | ||
18 | .Dt D2I_X509_ATTRIBUTE 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm d2i_X509_ATTRIBUTE , | ||
22 | .Nm i2d_X509_ATTRIBUTE | ||
23 | .\" In the following line, "X.501" and "Attribute" are not typos. | ||
24 | .\" The "Attribute" type is defined in X.501, not in X.509. | ||
25 | .\" The type in called "Attribute" with capital "A", not "attribute". | ||
26 | .Nd decode and encode generic X.501 Attribute | ||
27 | .Sh SYNOPSIS | ||
28 | .In openssl/x509.h | ||
29 | .Ft X509_ATTRIBUTE * | ||
30 | .Fo d2i_X509_ATTRIBUTE | ||
31 | .Fa "X509_ATTRIBUTE **val_out" | ||
32 | .Fa "const unsigned char **der_in" | ||
33 | .Fa "long length" | ||
34 | .Fc | ||
35 | .Ft int | ||
36 | .Fo i2d_X509_ATTRIBUTE | ||
37 | .Fa "X509_ATTRIBUTE *val_in" | ||
38 | .Fa "unsigned char **der_out" | ||
39 | .Fc | ||
40 | .Sh DESCRIPTION | ||
41 | .Fn d2i_X509_ATTRIBUTE | ||
42 | and | ||
43 | .Fn i2d_X509_ATTRIBUTE | ||
44 | decode and encode a generic ASN.1 | ||
45 | .Vt Attribute | ||
46 | structure defined in X.501 section 8.2. | ||
47 | For details about the semantics, examples, caveats, and bugs, see | ||
48 | .Xr ASN1_item_d2i 3 . | ||
49 | .Sh RETURN VALUES | ||
50 | .Fn d2i_X509_ATTRIBUTE | ||
51 | returns an | ||
52 | .Vt X509_ATTRIBUTE | ||
53 | object or | ||
54 | .Dv NULL | ||
55 | if an error occurs. | ||
56 | .Pp | ||
57 | .Fn i2d_X509_ATTRIBUTE | ||
58 | returns the number of bytes successfully encoded or a negative value | ||
59 | if an error occurs. | ||
60 | .Sh SEE ALSO | ||
61 | .Xr ASN1_item_d2i 3 , | ||
62 | .Xr d2i_PKCS12 3 , | ||
63 | .Xr d2i_PKCS8_PRIV_KEY_INFO 3 , | ||
64 | .Xr d2i_X509_EXTENSION 3 , | ||
65 | .Xr d2i_X509_REQ 3 , | ||
66 | .Xr X509_ATTRIBUTE_new 3 | ||
67 | .Sh STANDARDS | ||
68 | ITU-T Recommendation X.501, also known as ISO/IEC 9594-2: Information | ||
69 | Technology Open Systems Interconnection The Directory: Models, | ||
70 | section 8.2: Overall structure | ||
diff --git a/src/lib/libcrypto/man/d2i_X509_EXTENSION.3 b/src/lib/libcrypto/man/d2i_X509_EXTENSION.3 new file mode 100644 index 0000000000..8b31e2c667 --- /dev/null +++ b/src/lib/libcrypto/man/d2i_X509_EXTENSION.3 | |||
@@ -0,0 +1,92 @@ | |||
1 | .\" $OpenBSD: d2i_X509_EXTENSION.3,v 1.1 2016/12/28 13:45:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 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: December 28 2016 $ | ||
18 | .Dt D2I_X509_EXTENSION 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm d2i_X509_EXTENSION , | ||
22 | .Nm i2d_X509_EXTENSION , | ||
23 | .Nm d2i_X509_EXTENSIONS , | ||
24 | .Nm i2d_X509_EXTENSIONS | ||
25 | .\" In the next line, the capital "E" is not a typo. | ||
26 | .\" The ASN.1 structure is called "Extensions", not "extensions". | ||
27 | .Nd decode and encode X.509 Extensions | ||
28 | .Sh SYNOPSIS | ||
29 | .In openssl/x509.h | ||
30 | .Ft X509_EXTENSION * | ||
31 | .Fo d2i_X509_EXTENSION | ||
32 | .Fa "X509_EXTENSION **val_out" | ||
33 | .Fa "const unsigned char **der_in" | ||
34 | .Fa "long length" | ||
35 | .Fc | ||
36 | .Ft int | ||
37 | .Fo i2d_X509_EXTENSION | ||
38 | .Fa "X509_EXTENSION *val_in" | ||
39 | .Fa "unsigned char **der_out" | ||
40 | .Fc | ||
41 | .Ft X509_EXTENSIONS * | ||
42 | .Fo d2i_X509_EXTENSIONS | ||
43 | .Fa "X509_EXTENSIONS **val_out" | ||
44 | .Fa "const unsigned char **der_in" | ||
45 | .Fa "long length" | ||
46 | .Fc | ||
47 | .Ft int | ||
48 | .Fo i2d_X509_EXTENSIONS | ||
49 | .Fa "X509_EXTENSIONS *val_in" | ||
50 | .Fa "unsigned char **der_out" | ||
51 | .Fc | ||
52 | .Sh DESCRIPTION | ||
53 | .Fn d2i_X509_EXTENSION | ||
54 | and | ||
55 | .Fn i2d_X509_EXTENSION | ||
56 | decode and encode an ASN.1 | ||
57 | .Vt Extension | ||
58 | structure defined in RFC 5280 section 4.1. | ||
59 | .Pp | ||
60 | .Fn d2i_X509_EXTENSIONS | ||
61 | and | ||
62 | .Fn i2d_X509_EXTENSIONS | ||
63 | decode and encode an ASN.1 | ||
64 | .Vt Extensions | ||
65 | structure defined in RFC 5280 section 4.1, | ||
66 | which is a SEQUENCE OF | ||
67 | .Vt Extension . | ||
68 | .Sh RETURN VALUES | ||
69 | .Fn d2i_X509_EXTENSION | ||
70 | and | ||
71 | .Fn d2i_X509_EXTENSIONS | ||
72 | return an | ||
73 | .Vt X509_EXTENSION | ||
74 | or | ||
75 | .Vt X509_EXTENSIONS | ||
76 | object, respectively, or | ||
77 | .Dv NULL | ||
78 | if an error occurs. | ||
79 | .Pp | ||
80 | .Fn i2d_X509_EXTENSION | ||
81 | and | ||
82 | .Fn i2d_X509_EXTENSIONS | ||
83 | return the number of bytes successfully encoded or a negative value | ||
84 | if an error occurs. | ||
85 | .Sh SEE ALSO | ||
86 | .Xr ASN1_item_d2i 3 , | ||
87 | .Xr X509_EXTENSION_new 3 , | ||
88 | .Xr X509V3_get_d2i 3 , | ||
89 | .Xr X509v3_get_ext_by_NID 3 | ||
90 | .Sh STANDARDS | ||
91 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate and | ||
92 | Certificate Revocation List (CRL) Profile | ||