summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-12-23 00:40:16 +0000
committerschwarze <>2016-12-23 00:40:16 +0000
commitf188f6bd44b2c5213baa9288812e40d6480ca387 (patch)
tree4001df8589312693e4336ca2a61622373c6a2e85 /src/lib
parent867da3b40474288c6085c1151107759b20ce4d9e (diff)
downloadopenbsd-f188f6bd44b2c5213baa9288812e40d6480ca387.tar.gz
openbsd-f188f6bd44b2c5213baa9288812e40d6480ca387.tar.bz2
openbsd-f188f6bd44b2c5213baa9288812e40d6480ca387.zip
Write GENERAL_NAME_new(3) manual page from scratch - as if plain X.501
Name structures weren't already complicated enough, see X509_NAME_new(3). All these functions are listed in <openssl/x509v3.h> and in OpenSSL doc/man3/X509_dup.pod. OpenSSL documentation specifies the wrong header file.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/GENERAL_NAME_new.3136
-rw-r--r--src/lib/libcrypto/man/Makefile3
2 files changed, 138 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/GENERAL_NAME_new.3 b/src/lib/libcrypto/man/GENERAL_NAME_new.3
new file mode 100644
index 0000000000..c4e8fce764
--- /dev/null
+++ b/src/lib/libcrypto/man/GENERAL_NAME_new.3
@@ -0,0 +1,136 @@
1.\" $OpenBSD: GENERAL_NAME_new.3,v 1.1 2016/12/23 00:40:16 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 23 2016 $
18.Dt GENERAL_NAME_NEW 3
19.Os
20.Sh NAME
21.Nm GENERAL_NAME_new ,
22.Nm GENERAL_NAME_free ,
23.Nm GENERAL_NAMES_new ,
24.Nm GENERAL_NAMES_free ,
25.Nm EDIPARTYNAME_new ,
26.Nm EDIPARTYNAME_free ,
27.Nm OTHERNAME_new ,
28.Nm OTHERNAME_free
29.Nd names for use in X.509 extensions
30.Sh SYNOPSIS
31.In openssl/x509v3.h
32.Ft GENERAL_NAME *
33.Fn GENERAL_NAME_new void
34.Ft void
35.Fn GENERAL_NAME_free "GENERAL_NAME *name"
36.Ft GENERAL_NAMES *
37.Fn GENERAL_NAMES_new void
38.Ft void
39.Fn GENERAL_NAMES_free "GENERAL_NAMES *names"
40.Ft EDIPARTYNAME *
41.Fn EDIPARTYNAME_new void
42.Ft void
43.Fn EDIPARTYNAME_free "EDIPARTYNAME *name"
44.Ft OTHERNAME *
45.Fn OTHERNAME_new void
46.Ft void
47.Fn OTHERNAME_free "OTHERNAME *name"
48.Sh DESCRIPTION
49Even though the X.501 Name documented in
50.Xr X509_NAME_new 3
51is a complicated multi-layered structure, it is very rigid and not
52flexible enough to represent various entities that many people want
53to use as names in certificates.
54For that reason, X.509 extensions use the X.509 GeneralName
55wrapper structure rather than using the X.501 Name structure
56directly, at the expense of adding one or two additional layers
57of indirection.
58.Pp
59.Fn GENERAL_NAME_new
60allocates and initializes an empty
61.Vt GENERAL_NAME
62object, representing the ASN.1 GeneralName structure
63defined in RFC 5280 section 4.2.1.6.
64It can for example hold an
65.Vt X509_name
66object, an IP address, a DNS host name, a uniform resource identifier,
67an email address, or an
68.Vt EDIPARTYNAME
69or
70.Vt OTHERNAME
71object described below.
72.Fn GENERAL_NAME_free
73frees
74.Fa name .
75.Pp
76.Fn GENERAL_NAMES_new
77allocates and initializes an empty
78.Vt GENERAL_NAMES
79object, which is a
80.Vt STACK_OF(GENERAL_NAME)
81and represents the ASN.1 GeneralNames structure
82defined in RFC 5280 section 4.2.1.6.
83It is used by extension structures that can contain multiple names,
84for example key identifier, alternative name, and distribution point
85extensions.
86.Fn GENERAL_NAMES_free
87frees
88.Fa names .
89.Pp
90.Fn EDIPARTYNAME_new
91allocates and initializes an empty
92.Vt EDIPARTYNAME
93object, representing the ASN.1 EDIPartyName structure
94defined in RFC 5280 section 4.2.1.6, where
95.Dq EDI
96stands for
97.Dq electronic data identifier .
98It can hold two strings, the name itself and the name of the authority
99that assigned that name.
100.Fn EDIPARTYNAME_free
101frees
102.Fa name .
103.Pp
104.Fn OTHERNAME_new
105allocates and initializes an empty
106.Vt OTHERNAME
107object, representing the ASN.1 OtherName structure
108defined in RFC 5280 section 4.2.1.6.
109It can hold data of any
110.Vt ASN1_TYPE
111together with a type identifier.
112.Fn OTHERNAME_free
113frees
114.Fa name .
115.Sh RETURN VALUES
116.Fn GENERAL_NAME_new ,
117.Fn GENERAL_NAMES_new ,
118.Fn EDIPARTYNAME_new ,
119and
120.Fn OTHERNAME_new
121return a new
122.Vt GENERAL_NAME ,
123.Vt GENERAL_NAMES ,
124.Vt EDIPARTYNAME ,
125or
126.Vt OTHERNAME
127object or
128.Dv NULL
129if an error occurs.
130.Sh SEE ALSO
131.Xr X509_EXTENSION_new 3 ,
132.Xr X509_NAME_new 3
133.Sh STANDARDS
134RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
135Certificate Revocation List (CRL) Profile,
136section 4.2: Certificate Extensions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index d76403010d..f3910f74dd 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.89 2016/12/22 16:05:22 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.90 2016/12/23 00:40:16 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -120,6 +120,7 @@ MAN= \
120 EVP_SealInit.3 \ 120 EVP_SealInit.3 \
121 EVP_SignInit.3 \ 121 EVP_SignInit.3 \
122 EVP_VerifyInit.3 \ 122 EVP_VerifyInit.3 \
123 GENERAL_NAME_new.3 \
123 HMAC.3 \ 124 HMAC.3 \
124 MD5.3 \ 125 MD5.3 \
125 OBJ_nid2obj.3 \ 126 OBJ_nid2obj.3 \