1 .\" $OpenBSD: OCSP_response_status.3,v 1.4 2016/12/25 22:15:10 schwarze Exp $
2 .\" OpenSSL bb9ad09e Jun 6 00:43:05 2016 -0400
4 .\" This file is a derived work.
5 .\" The changes are covered by the following Copyright and license:
7 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
9 .\" Permission to use, copy, modify, and distribute this software for any
10 .\" purpose with or without fee is hereby granted, provided that the above
11 .\" copyright notice and this permission notice appear in all copies.
13 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>.
22 .\" Copyright (c) 2014, 2016 The OpenSSL Project. All rights reserved.
24 .\" Redistribution and use in source and binary forms, with or without
25 .\" modification, are permitted provided that the following conditions
28 .\" 1. Redistributions of source code must retain the above copyright
29 .\" notice, this list of conditions and the following disclaimer.
31 .\" 2. Redistributions in binary form must reproduce the above copyright
32 .\" notice, this list of conditions and the following disclaimer in
33 .\" the documentation and/or other materials provided with the
36 .\" 3. All advertising materials mentioning features or use of this
37 .\" software must display the following acknowledgment:
38 .\" "This product includes software developed by the OpenSSL Project
39 .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
41 .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
42 .\" endorse or promote products derived from this software without
43 .\" prior written permission. For written permission, please contact
44 .\" openssl-core@openssl.org.
46 .\" 5. Products derived from this software may not be called "OpenSSL"
47 .\" nor may "OpenSSL" appear in their names without prior written
48 .\" permission of the OpenSSL Project.
50 .\" 6. Redistributions of any form whatsoever must retain the following
52 .\" "This product includes software developed by the OpenSSL Project
53 .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
55 .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
56 .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
57 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
58 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
59 .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
60 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
61 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
62 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
63 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
64 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
65 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
66 .\" OF THE POSSIBILITY OF SUCH DAMAGE.
68 .Dd $Mdocdate: December 25 2016 $
69 .Dt OCSP_RESPONSE_STATUS 3
72 .Nm OCSP_RESPONSE_new ,
73 .Nm OCSP_RESPONSE_free ,
74 .Nm OCSP_RESPBYTES_new ,
75 .Nm OCSP_RESPBYTES_free ,
76 .Nm OCSP_BASICRESP_new ,
77 .Nm OCSP_BASICRESP_free ,
78 .Nm OCSP_RESPDATA_new ,
79 .Nm OCSP_RESPDATA_free ,
81 .Nm OCSP_RESPID_free ,
82 .Nm OCSP_response_create ,
83 .Nm OCSP_response_status ,
84 .Nm OCSP_response_get1_basic
85 .Nd OCSP response functions
89 .Fn OCSP_RESPONSE_new void
91 .Fn OCSP_RESPONSE_free "OCSP_RESPONSE *resp"
93 .Fn OCSP_RESPBYTES_new void
95 .Fn OCSP_RESPBYTES_free "OCSP_RESPBYTES *respbytes"
97 .Fn OCSP_BASICRESP_new void
99 .Fn OCSP_BASICRESP_free "OCSP_BASICRESP *bs"
101 .Fn OCSP_RESPDATA_new void
103 .Fn OCSP_RESPDATA_free "OCSP_RESPDATA *respdata"
105 .Fn OCSP_RESPID_new void
107 .Fn OCSP_RESPID_free "OCSP_RESPID *respid"
109 .Fo OCSP_response_create
111 .Fa "OCSP_BASICRESP *bs"
114 .Fo OCSP_response_status
115 .Fa "OCSP_RESPONSE *resp"
118 .Fo OCSP_response_get1_basic
119 .Fa "OCSP_RESPONSE *resp"
122 .Fn OCSP_RESPONSE_new
123 allocates and initializes an empty
125 object, representing an ASN.1
127 structure defined in RFC 6960.
128 .Fn OCSP_RESPONSE_free
132 .Fn OCSP_RESPBYTES_new
133 allocates and initializes an empty
135 object, representing an ASN.1
137 structure defined in RFC 6960.
138 Such an object is used inside
140 .Fn OCSP_RESPBYTES_free
144 .Fn OCSP_BASICRESP_new
145 allocates and initializes an empty
147 object, representing an ASN.1
148 .Vt BasicOCSPResponse
149 structure defined in RFC 6960.
151 contains the DER-encoded form of an
154 .Fn OCSP_BASICRESP_free
158 .Fn OCSP_RESPDATA_new
159 allocates and initializes an empty
161 object, representing an ASN.1
163 structure defined in RFC 6960.
164 Such an object is used inside
166 .Fn OCSP_RESPDATA_free
171 allocates and initializes an empty
173 object, representing an ASN.1
175 structure defined in RFC 6960.
176 Such an object is used inside
182 .Fn OCSP_response_create
187 and optionally including the basic response
190 .Fn OCSP_response_status
191 returns the OCSP response status of
193 It returns one of the values
194 .Dv OCSP_RESPONSE_STATUS_SUCCESSFUL ,
195 .Dv OCSP_RESPONSE_STATUS_MALFORMEDREQUEST ,
196 .Dv OCSP_RESPONSE_STATUS_INTERNALERROR ,
197 .Dv OCSP_RESPONSE_STATUS_TRYLATER ,
198 .Dv OCSP_RESPONSE_STATUS_SIGREQUIRED ,
200 .Dv OCSP_RESPONSE_STATUS_UNAUTHORIZED .
202 .Fn OCSP_response_get1_basic
203 decodes and returns the
207 It is only called if the status of a response is
208 .Dv OCSP_RESPONSE_STATUS_SUCCESSFUL .
210 .Fn OCSP_RESPONSE_new
212 .Fn OCSP_response_create
213 return a pointer to an
217 if an error occurred.
219 .Fn OCSP_BASICRESP_new
221 .Fn OCSP_response_get1_basic
222 return a pointer to an
226 if an error occurred.
228 .Fn OCSP_RESPBYTES_new ,
229 .Fn OCSP_RESPDATA_new ,
232 return a pointer to an empty
237 object, respectively, or
239 if an error occurred.
241 .Fn OCSP_response_status
242 returns a status value.
244 .Xr OCSP_cert_to_id 3 ,
245 .Xr OCSP_request_add1_nonce 3 ,
246 .Xr OCSP_REQUEST_new 3 ,
247 .Xr OCSP_resp_find_status 3 ,
248 .Xr OCSP_sendreq_new 3
250 RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate
251 Status Protocol, section 4.2: Response Syntax