1 .\" $OpenBSD: d2i_POLICYINFO.3,v 1.2 2018/03/21 17:57:48 schwarze Exp $
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
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.
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.
17 .Dd $Mdocdate: March 21 2018 $
23 .Nm d2i_CERTIFICATEPOLICIES ,
24 .Nm i2d_CERTIFICATEPOLICIES ,
25 .Nm d2i_POLICYQUALINFO ,
26 .Nm i2d_POLICYQUALINFO ,
31 .Nd decode and encode X.509 certificate policies
36 .Fa "POLICYINFO **val_out"
37 .Fa "const unsigned char **der_in"
42 .Fa "POLICYINFO *val_in"
43 .Fa "unsigned char **der_out"
45 .Ft CERTIFICATEPOLICIES *
46 .Fo d2i_CERTIFICATEPOLICIES
47 .Fa "CERTIFICATEPOLICIES **val_out"
48 .Fa "const unsigned char **der_in"
52 .Fo i2d_CERTIFICATEPOLICIES
53 .Fa "CERTIFICATEPOLICIES *val_in"
54 .Fa "unsigned char **der_out"
57 .Fo d2i_POLICYQUALINFO
58 .Fa "POLICYQUALINFO **val_out"
59 .Fa "const unsigned char **der_in"
63 .Fo i2d_POLICYQUALINFO
64 .Fa "POLICYQUALINFO *val_in"
65 .Fa "unsigned char **der_out"
69 .Fa "USERNOTICE **val_out"
70 .Fa "const unsigned char **der_in"
75 .Fa "USERNOTICE *val_in"
76 .Fa "unsigned char **der_out"
80 .Fa "NOTICEREF **val_out"
81 .Fa "const unsigned char **der_in"
86 .Fa "NOTICEREF *val_in"
87 .Fa "unsigned char **der_out"
90 These functions decode and encode X.509 certificate policies.
91 For details about the semantics, examples, caveats, and bugs, see
97 decode and encode an ASN.1
99 structure defined in RFC 5280 section 4.2.1.4.
101 .Fn d2i_CERTIFICATEPOLICIES
103 .Fn i2d_CERTIFICATEPOLICIES
104 decode and encode an ASN.1
105 .Vt CertificatePolicies
106 structure defined in RFC 5280 section 4.2.1.4.
108 .Fn d2i_POLICYQUALINFO
110 .Fn i2d_POLICYQUALINFO
111 decode and encode an ASN.1
112 .Vt PolicyQualifierInfo
113 structure defined in RFC 5280 section 4.2.1.4.
118 decode and encode an ASN.1
120 structure defined in RFC 5280 section 4.2.1.4.
125 decode and encode an ASN.1
127 structure defined in RFC 5280 section 4.2.1.4.
130 .Fn d2i_CERTIFICATEPOLICIES ,
131 .Fn d2i_POLICYQUALINFO ,
137 .Vt CERTIFICATEPOLICIES ,
142 object, respectively, or
147 .Fn i2d_CERTIFICATEPOLICIES ,
148 .Fn i2d_POLICYQUALINFO ,
152 return the number of bytes successfully encoded or a negative value
155 .Xr ASN1_item_d2i 3 ,
156 .Xr POLICYINFO_new 3 ,
157 .Xr X509_EXTENSION_new 3
159 RFC 5280: Internet X.509 Public Key Infrastructure Certificate and
160 Certificate Revocation List (CRL) Profile,
161 section 4.2.1.4: Certificate Policies
163 These functions first appeared in OpenSSL 0.9.3
164 and have been available since