1 .\" $OpenBSD: d2i_OCSP_RESPONSE.3,v 1.1 2016/12/27 22:06:55 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: December 27 2016 $
18 .Dt D2I_OCSP_RESPONSE 3
21 .Nm d2i_OCSP_RESPONSE ,
22 .Nm i2d_OCSP_RESPONSE ,
23 .Nm d2i_OCSP_RESPBYTES ,
24 .Nm i2d_OCSP_RESPBYTES ,
25 .Nm d2i_OCSP_BASICRESP ,
26 .Nm i2d_OCSP_BASICRESP ,
27 .Nm d2i_OCSP_RESPDATA ,
28 .Nm i2d_OCSP_RESPDATA ,
31 .Nm d2i_OCSP_SINGLERESP ,
32 .Nm i2d_OCSP_SINGLERESP ,
33 .Nm d2i_OCSP_CERTSTATUS ,
34 .Nm i2d_OCSP_CERTSTATUS ,
35 .Nm d2i_OCSP_REVOKEDINFO ,
36 .Nm i2d_OCSP_REVOKEDINFO ,
39 .Nd decode and encode OCSP responses
44 .Fa "OCSP_RESPONSE **val_out"
45 .Fa "const unsigned char **der_in"
50 .Fa "OCSP_RESPONSE *val_in"
51 .Fa "unsigned char **der_out"
54 .Fo d2i_OCSP_RESPBYTES
55 .Fa "OCSP_RESPBYTES **val_out"
56 .Fa "const unsigned char **der_in"
60 .Fo i2d_OCSP_RESPBYTES
61 .Fa "OCSP_RESPBYTES *val_in"
62 .Fa "unsigned char **der_out"
65 .Fo d2i_OCSP_BASICRESP
66 .Fa "OCSP_BASICRESP **val_out"
67 .Fa "const unsigned char **der_in"
71 .Fo i2d_OCSP_BASICRESP
72 .Fa "OCSP_BASICRESP *val_in"
73 .Fa "unsigned char **der_out"
77 .Fa "OCSP_RESPDATA **val_out"
78 .Fa "const unsigned char **der_in"
83 .Fa "OCSP_RESPDATA *val_in"
84 .Fa "unsigned char **der_out"
88 .Fa "OCSP_RESPID **val_out"
89 .Fa "const unsigned char **der_in"
94 .Fa "OCSP_RESPID *val_in"
95 .Fa "unsigned char **der_out"
98 .Fo d2i_OCSP_SINGLERESP
99 .Fa "OCSP_SINGLERESP **val_out"
100 .Fa "const unsigned char **der_in"
104 .Fo i2d_OCSP_SINGLERESP
105 .Fa "OCSP_SINGLERESP *val_in"
106 .Fa "unsigned char **der_out"
108 .Ft OCSP_CERTSTATUS *
109 .Fo d2i_OCSP_CERTSTATUS
110 .Fa "OCSP_CERTSTATUS **val_out"
111 .Fa "const unsigned char **der_in"
115 .Fo i2d_OCSP_CERTSTATUS
116 .Fa "OCSP_CERTSTATUS *val_in"
117 .Fa "unsigned char **der_out"
119 .Ft OCSP_REVOKEDINFO *
120 .Fo d2i_OCSP_REVOKEDINFO
121 .Fa "OCSP_REVOKEDINFO **val_out"
122 .Fa "const unsigned char **der_in"
126 .Fo i2d_OCSP_REVOKEDINFO
127 .Fa "OCSP_REVOKEDINFO *val_in"
128 .Fa "unsigned char **der_out"
132 .Fa "OCSP_CRLID **val_out"
133 .Fa "const unsigned char **der_in"
138 .Fa "OCSP_CRLID *val_in"
139 .Fa "unsigned char **der_out"
142 Theses functions decode and encode ASN.1 structures used for OCSP
144 For details about the semantics, examples, caveats, and bugs, see
145 .Xr ASN1_item_d2i 3 .
147 .Fn d2i_OCSP_RESPONSE
149 .Fn i2d_OCSP_RESPONSE
150 decode and encode an ASN.1
152 structure defined in RFC 6960 section 4.2.1.
154 .Fn d2i_OCSP_RESPBYTES
156 .Fn i2d_OCSP_RESPBYTES
157 decode and encode an ASN.1
159 structure defined in RFC 6960 section 4.2.1.
161 .Fn d2i_OCSP_BASICRESP
163 .Fn i2d_OCSP_BASICRESP
164 decode and encode an ASN.1
165 .Vt BasicOCSPResponse
166 structure defined in RFC 6960 section 4.2.1.
168 .Fn d2i_OCSP_RESPDATA
170 .Fn i2d_OCSP_RESPDATA
171 decode and encode an ASN.1
173 structure defined in RFC 6960 section 4.2.1.
178 decode and encode an ASN.1
180 structure defined in RFC 6960 section 4.2.1.
182 .Fn d2i_OCSP_SINGLERESP
184 .Fn i2d_OCSP_SINGLERESP
185 decode and encode an ASN.1
187 structure defined in RFC 6960 section 4.2.1.
189 .Fn d2i_OCSP_CERTSTATUS
191 .Fn i2d_OCSP_CERTSTATUS
192 decode and encode an ASN.1
194 structure defined in RFC 6960 section 4.2.1.
196 .Fn d2i_OCSP_REVOKEDINFO
198 .Fn i2d_OCSP_REVOKEDINFO
199 decode and encode an ASN.1
201 structure defined in RFC 6960 section 4.2.1.
206 decode and encode an ASN.1
208 structure defined in RFC 6960 section 4.4.2.
210 .Fn d2i_OCSP_RESPONSE ,
211 .Fn d2i_OCSP_RESPBYTES ,
212 .Fn d2i_OCSP_BASICRESP ,
213 .Fn d2i_OCSP_RESPDATA ,
214 .Fn d2i_OCSP_RESPID ,
215 .Fn d2i_OCSP_SINGLERESP ,
216 .Fn d2i_OCSP_CERTSTATUS ,
217 .Fn d2i_OCSP_REVOKEDINFO ,
220 return an object of the respective type or
224 .Fn i2d_OCSP_RESPONSE ,
225 .Fn i2d_OCSP_RESPBYTES ,
226 .Fn i2d_OCSP_BASICRESP ,
227 .Fn i2d_OCSP_RESPDATA ,
228 .Fn i2d_OCSP_RESPID ,
229 .Fn i2d_OCSP_SINGLERESP ,
230 .Fn i2d_OCSP_CERTSTATUS ,
231 .Fn i2d_OCSP_REVOKEDINFO ,
234 return the number of bytes successfully encoded or a negative value
237 .Xr ASN1_item_d2i 3 ,
238 .Xr OCSP_CRLID_new 3 ,
239 .Xr OCSP_RESPONSE_new 3 ,
240 .Xr OCSP_SINGLERESP_new 3
242 RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
243 Status Protocol, section 4.2: Response Syntax