summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2016-12-23 18:50:23 +0000
committerschwarze <>2016-12-23 18:50:23 +0000
commit080cb79e340f5ae69907f16710758bcc2c19b7d7 (patch)
tree8a8c859ce12e16ce08480c7492a23e2150ff1e22 /src/lib
parent6f08751e5891d92bd46f6a3e3985cc414a7326cb (diff)
downloadopenbsd-080cb79e340f5ae69907f16710758bcc2c19b7d7.tar.gz
openbsd-080cb79e340f5ae69907f16710758bcc2c19b7d7.tar.bz2
openbsd-080cb79e340f5ae69907f16710758bcc2c19b7d7.zip
Write new POLICYINFO_new(3) manual page from scratch; i can't say that
i particularly like these fourteen functions, but they are all 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/Makefile3
-rw-r--r--src/lib/libcrypto/man/POLICYINFO_new.3187
2 files changed, 189 insertions, 1 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index e715e8bf2d..a29fb912ec 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.94 2016/12/23 17:41:29 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.95 2016/12/23 18:50:23 schwarze Exp $
2 2
3.include <bsd.own.mk> 3.include <bsd.own.mk>
4 4
@@ -158,6 +158,7 @@ MAN= \
158 PKCS7_sign_add_signer.3 \ 158 PKCS7_sign_add_signer.3 \
159 PKCS7_verify.3 \ 159 PKCS7_verify.3 \
160 PKCS8_PRIV_KEY_INFO_new.3 \ 160 PKCS8_PRIV_KEY_INFO_new.3 \
161 POLICYINFO_new.3 \
161 RAND_add.3 \ 162 RAND_add.3 \
162 RAND_bytes.3 \ 163 RAND_bytes.3 \
163 RAND_load_file.3 \ 164 RAND_load_file.3 \
diff --git a/src/lib/libcrypto/man/POLICYINFO_new.3 b/src/lib/libcrypto/man/POLICYINFO_new.3
new file mode 100644
index 0000000000..a76385fc6b
--- /dev/null
+++ b/src/lib/libcrypto/man/POLICYINFO_new.3
@@ -0,0 +1,187 @@
1.\" $OpenBSD: POLICYINFO_new.3,v 1.1 2016/12/23 18:50:23 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 POLICYINFO_NEW 3
19.Os
20.Sh NAME
21.Nm POLICYINFO_new ,
22.Nm POLICYINFO_free ,
23.Nm CERTIFICATEPOLICIES_new ,
24.Nm CERTIFICATEPOLICIES_free ,
25.Nm POLICYQUALINFO_new ,
26.Nm POLICYQUALINFO_free ,
27.Nm USERNOTICE_new ,
28.Nm USERNOTICE_free ,
29.Nm NOTICEREF_new ,
30.Nm NOTICEREF_free ,
31.Nm POLICY_MAPPING_new ,
32.Nm POLICY_MAPPING_free ,
33.Nm POLICY_CONSTRAINTS_new ,
34.Nm POLICY_CONSTRAINTS_free
35.Nd X.509 certificate policies
36.Sh SYNOPSIS
37.In openssl/x509v3.h
38.Ft POLICYINFO *
39.Fn POLICYINFO_new void
40.Ft void
41.Fn POLICYINFO_free "POLICYINFO *pi"
42.Ft CERTIFICATEPOLICIES *
43.Fn CERTIFICATEPOLICIES_new void
44.Ft void
45.Fn CERTIFICATEPOLICIES_free "CERTIFICATEPOLICIES *pis"
46.Ft POLICYQUALINFO *
47.Fn POLICYQUALINFO_new void
48.Ft void
49.Fn POLICYQUALINFO_free "POLICYQUALINFO *pqi"
50.Ft USERNOTICE *
51.Fn USERNOTICE_new void
52.Ft void
53.Fn USERNOTICE_free "USERNOTICE *usernotice"
54.Ft NOTICEREF *
55.Fn NOTICEREF_new void
56.Ft void
57.Fn NOTICEREF_free "NOTICEREF *noticeref"
58.Ft POLICY_MAPPING *
59.Fn POLICY_MAPPING_new void
60.Ft void
61.Fn POLICY_MAPPING_free "POLICY_MAPPING *pm"
62.Ft POLICY_CONSTRAINTS *
63.Fn POLICY_CONSTRAINTS_new void
64.Ft void
65.Fn POLICY_CONSTRAINTS_free "POLICY_CONSTRAINTS *pc"
66.Sh DESCRIPTION
67X.509 CA and end entity certificates can optionally indicate
68restrictions on their intended use.
69.Pp
70.Fn POLICYINFO_new
71allocates and initializes an empty
72.Vt POLICYINFO
73object, representing an ASN.1 PolicyInformation structure
74defined in RFC 5280 section 4.2.1.4.
75It can hold a policy identifier and optional advisory qualifiers.
76.Fn POLICYINFO_free
77frees
78.Fa pi .
79.Pp
80.Fn CERTIFICATEPOLICIES_new
81allocates and initializes an empty
82.Vt CERTIFICATEPOLICIES
83object, which is a
84.Vt STACK_OF(POLICYINFO)
85and represents an ASN.1 CertificatePolicies structure
86defined in RFC 5280 section 4.2.1.4.
87It can be used by
88.Vt X509
89objects, both by CA certificates and end entity certificates.
90.Fn CERTIFICATEPOLICIES_free
91frees
92.Fa pis .
93.Pp
94.Fn POLICYQUALINFO_new
95allocates and initializes an empty
96.Vt POLICYQUALINFO
97object, representing an ASN.1 PolicyQualifierInfo structure
98defined in RFC 5280 section 4.2.1.4.
99It can be used in
100.Vt POLICYINFO
101and it can hold either a uniform resource identifier of a certification
102practice statement published by the CA, or a pointer to a
103.Vt USERNOTICE
104object, or arbitrary other information.
105.Fn POLICYQUALINFO_free
106frees
107.Fa pqi .
108.Pp
109.Fn USERNOTICE_new
110allocates and initializes an empty
111.Vt USERNOTICE
112object, representing an ASN.1 UserNotice structure
113defined in RFC 5280 section 4.2.1.4.
114It can be used in
115.Vt POLICYQUALINFO
116and it can hold either an
117.Vt ASN1_STRING
118intended for display to the user or a pointer to a
119.Vt NOTICEREF
120object.
121.Fn NOTICEREF_free
122frees
123.Fa usernotice .
124.Pp
125.Fn NOTICEREF_new
126allocates and initializes an empty
127.Vt NOTICEREF
128object, representing an ASN.1 NoticeReference structure
129defined in RFC 5280 section 4.2.1.4.
130It can be used in
131.Vt USERNOTICE
132and can hold an organization name and a stack of notice numbers.
133.Fn NOTICEREF_free
134frees
135.Fa noticeref .
136.Pp
137.Fn POLICY_MAPPING_new
138allocates and initializes an empty
139.Vt POLICY_MAPPING
140object, representing an ASN.1 PolicyMappings structure
141defined in RFC 5280 section 4.2.1.5.
142It can be used in
143.Vt X509
144CA certificates and can hold a list of pairs of policy identifiers,
145declaring one of the policies in each pair as equivalent to the
146other.
147.Fn POLICY_MAPPING_free
148frees
149.Fa pm .
150.Pp
151.Fn POLICY_CONSTRAINTS_new
152allocates and initializes an empty
153.Vt POLICY_CONSTRAINTS
154object, representing an ASN.1 PolicyConstraints structure
155defined in RFC 5280 section 4.2.1.11.
156It can be used in
157.Vt X509
158CA certificates to restrict policy mapping and/or to require explicit
159certificate policies in subsequent intermediate certificates in the
160certification path.
161.Fn POLICY_CONSTRAINTS_free
162frees
163.Fa pc .
164.Sh RETURN VALUES
165The constructor functions return a new object of the respective
166type or
167.Dv NULL
168if an error occurs.
169.Sh SEE ALSO
170.Xr BASIC_CONSTRAINTS_new 3 ,
171.Xr NAME_CONSTRAINTS_new 3 ,
172.Xr X509_EXTENSION_new 3 ,
173.Xr X509_new 3
174.Sh STANDARDS
175RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
176Certificate Revocation List (CRL) Profile:
177.Bl -dash -compact
178.It
179section 4.2.1.4: Certificate Policies
180.It
181section 4.2.1.5: Policy Mappings
182.It
183section 4.2.1.11: Policy Constraints
184.El
185.Sh BUGS
186This is a lot of nested data structures, but most of them are
187designed to have almost no effect.