summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/POLICYINFO_new.3
blob: e746759a93130658db178a27ad48022c334ef825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
.\"	$OpenBSD: POLICYINFO_new.3,v 1.3 2016/12/28 20:29:15 schwarze Exp $
.\"
.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: December 28 2016 $
.Dt POLICYINFO_NEW 3
.Os
.Sh NAME
.Nm POLICYINFO_new ,
.Nm POLICYINFO_free ,
.Nm CERTIFICATEPOLICIES_new ,
.Nm CERTIFICATEPOLICIES_free ,
.Nm POLICYQUALINFO_new ,
.Nm POLICYQUALINFO_free ,
.Nm USERNOTICE_new ,
.Nm USERNOTICE_free ,
.Nm NOTICEREF_new ,
.Nm NOTICEREF_free ,
.Nm POLICY_MAPPING_new ,
.Nm POLICY_MAPPING_free ,
.Nm POLICY_CONSTRAINTS_new ,
.Nm POLICY_CONSTRAINTS_free
.Nd X.509 certificate policies
.Sh SYNOPSIS
.In openssl/x509v3.h
.Ft POLICYINFO *
.Fn POLICYINFO_new void
.Ft void
.Fn POLICYINFO_free "POLICYINFO *pi"
.Ft CERTIFICATEPOLICIES *
.Fn CERTIFICATEPOLICIES_new void
.Ft void
.Fn CERTIFICATEPOLICIES_free "CERTIFICATEPOLICIES *pis"
.Ft POLICYQUALINFO *
.Fn POLICYQUALINFO_new void
.Ft void
.Fn POLICYQUALINFO_free "POLICYQUALINFO *pqi"
.Ft USERNOTICE *
.Fn USERNOTICE_new void
.Ft void
.Fn USERNOTICE_free "USERNOTICE *usernotice"
.Ft NOTICEREF *
.Fn NOTICEREF_new void
.Ft void
.Fn NOTICEREF_free "NOTICEREF *noticeref"
.Ft POLICY_MAPPING *
.Fn POLICY_MAPPING_new void
.Ft void
.Fn POLICY_MAPPING_free "POLICY_MAPPING *pm"
.Ft POLICY_CONSTRAINTS *
.Fn POLICY_CONSTRAINTS_new void
.Ft void
.Fn POLICY_CONSTRAINTS_free "POLICY_CONSTRAINTS *pc"
.Sh DESCRIPTION
X.509 CA and end entity certificates can optionally indicate
restrictions on their intended use.
.Pp
.Fn POLICYINFO_new
allocates and initializes an empty
.Vt POLICYINFO
object, representing an ASN.1
.Vt PolicyInformation
structure defined in RFC 5280 section 4.2.1.4.
It can hold a policy identifier and optional advisory qualifiers.
.Fn POLICYINFO_free
frees
.Fa pi .
.Pp
.Fn CERTIFICATEPOLICIES_new
allocates and initializes an empty
.Vt CERTIFICATEPOLICIES
object, which is a
.Vt STACK_OF(POLICYINFO)
and represents an ASN.1
.Vt CertificatePolicies
structure defined in RFC 5280 section 4.2.1.4.
It can be used by
.Vt X509
objects, both by CA certificates and end entity certificates.
.Fn CERTIFICATEPOLICIES_free
frees
.Fa pis .
.Pp
.Fn POLICYQUALINFO_new
allocates and initializes an empty
.Vt POLICYQUALINFO
object, representing an ASN.1
.Vt PolicyQualifierInfo
structure defined in RFC 5280 section 4.2.1.4.
It can be used in
.Vt POLICYINFO
and it can hold either a uniform resource identifier of a certification
practice statement published by the CA, or a pointer to a
.Vt USERNOTICE
object, or arbitrary other information.
.Fn POLICYQUALINFO_free
frees
.Fa pqi .
.Pp
.Fn USERNOTICE_new
allocates and initializes an empty
.Vt USERNOTICE
object, representing an ASN.1
.Vt UserNotice
structure defined in RFC 5280 section 4.2.1.4.
It can be used in
.Vt POLICYQUALINFO
and it can hold either an
.Vt ASN1_STRING
intended for display to the user or a pointer to a
.Vt NOTICEREF
object.
.Fn NOTICEREF_free
frees
.Fa usernotice .
.Pp
.Fn NOTICEREF_new
allocates and initializes an empty
.Vt NOTICEREF
object, representing an ASN.1
.Vt NoticeReference
structure defined in RFC 5280 section 4.2.1.4.
It can be used in
.Vt USERNOTICE
and can hold an organization name and a stack of notice numbers.
.Fn NOTICEREF_free
frees
.Fa noticeref .
.Pp
.Fn POLICY_MAPPING_new
allocates and initializes an empty
.Vt POLICY_MAPPING
object, representing an ASN.1
.Vt PolicyMappings
structure defined in RFC 5280 section 4.2.1.5.
It can be used in
.Vt X509
CA certificates and can hold a list of pairs of policy identifiers,
declaring one of the policies in each pair as equivalent to the
other.
.Fn POLICY_MAPPING_free
frees
.Fa pm .
.Pp
.Fn POLICY_CONSTRAINTS_new
allocates and initializes an empty
.Vt POLICY_CONSTRAINTS
object, representing an ASN.1
.Vt PolicyConstraints
structure defined in RFC 5280 section 4.2.1.11.
It can be used in
.Vt X509
CA certificates to restrict policy mapping and/or to require explicit
certificate policies in subsequent intermediate certificates in the
certification path.
.Fn POLICY_CONSTRAINTS_free
frees
.Fa pc .
.Sh RETURN VALUES
The constructor functions return a new object of the respective
type or
.Dv NULL
if an error occurs.
.Sh SEE ALSO
.Xr BASIC_CONSTRAINTS_new 3 ,
.Xr NAME_CONSTRAINTS_new 3 ,
.Xr X509_EXTENSION_new 3 ,
.Xr X509_new 3
.Sh STANDARDS
RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
Certificate Revocation List (CRL) Profile:
.Bl -dash -compact
.It
section 4.2.1.4: Certificate Policies
.It
section 4.2.1.5: Policy Mappings
.It
section 4.2.1.11: Policy Constraints
.El
.Sh BUGS
This is a lot of nested data structures, but most of them are
designed to have almost no effect.