williamr@2
|
1 |
/* ocsp.h */
|
williamr@2
|
2 |
/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
|
williamr@2
|
3 |
* project. */
|
williamr@2
|
4 |
|
williamr@2
|
5 |
/* History:
|
williamr@2
|
6 |
This file was transfered to Richard Levitte from CertCo by Kathy
|
williamr@2
|
7 |
Weinhold in mid-spring 2000 to be included in OpenSSL or released
|
williamr@2
|
8 |
as a patch kit. */
|
williamr@2
|
9 |
|
williamr@2
|
10 |
/* ====================================================================
|
williamr@2
|
11 |
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
|
williamr@2
|
12 |
*
|
williamr@2
|
13 |
* Redistribution and use in source and binary forms, with or without
|
williamr@2
|
14 |
* modification, are permitted provided that the following conditions
|
williamr@2
|
15 |
* are met:
|
williamr@2
|
16 |
*
|
williamr@2
|
17 |
* 1. Redistributions of source code must retain the above copyright
|
williamr@2
|
18 |
* notice, this list of conditions and the following disclaimer.
|
williamr@2
|
19 |
*
|
williamr@2
|
20 |
* 2. Redistributions in binary form must reproduce the above copyright
|
williamr@2
|
21 |
* notice, this list of conditions and the following disclaimer in
|
williamr@2
|
22 |
* the documentation and/or other materials provided with the
|
williamr@2
|
23 |
* distribution.
|
williamr@2
|
24 |
*
|
williamr@2
|
25 |
* 3. All advertising materials mentioning features or use of this
|
williamr@2
|
26 |
* software must display the following acknowledgment:
|
williamr@2
|
27 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
28 |
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
williamr@2
|
29 |
*
|
williamr@2
|
30 |
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
williamr@2
|
31 |
* endorse or promote products derived from this software without
|
williamr@2
|
32 |
* prior written permission. For written permission, please contact
|
williamr@2
|
33 |
* openssl-core@openssl.org.
|
williamr@2
|
34 |
*
|
williamr@2
|
35 |
* 5. Products derived from this software may not be called "OpenSSL"
|
williamr@2
|
36 |
* nor may "OpenSSL" appear in their names without prior written
|
williamr@2
|
37 |
* permission of the OpenSSL Project.
|
williamr@2
|
38 |
*
|
williamr@2
|
39 |
* 6. Redistributions of any form whatsoever must retain the following
|
williamr@2
|
40 |
* acknowledgment:
|
williamr@2
|
41 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
42 |
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
williamr@2
|
43 |
*
|
williamr@2
|
44 |
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
williamr@2
|
45 |
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
williamr@2
|
46 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
williamr@2
|
47 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
williamr@2
|
48 |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
williamr@2
|
49 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
williamr@2
|
50 |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
williamr@2
|
51 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
williamr@2
|
52 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
williamr@2
|
53 |
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
williamr@2
|
54 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
williamr@2
|
55 |
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
williamr@2
|
56 |
* ====================================================================
|
williamr@2
|
57 |
*
|
williamr@2
|
58 |
* This product includes cryptographic software written by Eric Young
|
williamr@2
|
59 |
* (eay@cryptsoft.com). This product includes software written by Tim
|
williamr@2
|
60 |
* Hudson (tjh@cryptsoft.com).
|
williamr@2
|
61 |
*
|
williamr@2
|
62 |
*/
|
williamr@2
|
63 |
/*
|
williamr@2
|
64 |
© Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
|
williamr@2
|
65 |
*/
|
williamr@2
|
66 |
|
williamr@2
|
67 |
#ifndef HEADER_OCSP_H
|
williamr@2
|
68 |
#define HEADER_OCSP_H
|
williamr@2
|
69 |
|
williamr@2
|
70 |
#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
|
williamr@2
|
71 |
#define SYMBIAN
|
williamr@2
|
72 |
#endif
|
williamr@2
|
73 |
|
williamr@2
|
74 |
#ifdef SYMBIAN
|
williamr@2
|
75 |
#include <e32def.h>
|
williamr@2
|
76 |
#endif
|
williamr@2
|
77 |
#include <openssl/x509.h>
|
williamr@2
|
78 |
#include <openssl/x509v3.h>
|
williamr@2
|
79 |
#include <openssl/safestack.h>
|
williamr@2
|
80 |
|
williamr@2
|
81 |
#ifdef __cplusplus
|
williamr@2
|
82 |
extern "C" {
|
williamr@2
|
83 |
#endif
|
williamr@2
|
84 |
|
williamr@2
|
85 |
/* Various flags and values */
|
williamr@2
|
86 |
|
williamr@2
|
87 |
#define OCSP_DEFAULT_NONCE_LENGTH 16
|
williamr@2
|
88 |
|
williamr@2
|
89 |
#define OCSP_NOCERTS 0x1
|
williamr@2
|
90 |
#define OCSP_NOINTERN 0x2
|
williamr@2
|
91 |
#define OCSP_NOSIGS 0x4
|
williamr@2
|
92 |
#define OCSP_NOCHAIN 0x8
|
williamr@2
|
93 |
#define OCSP_NOVERIFY 0x10
|
williamr@2
|
94 |
#define OCSP_NOEXPLICIT 0x20
|
williamr@2
|
95 |
#define OCSP_NOCASIGN 0x40
|
williamr@2
|
96 |
#define OCSP_NODELEGATED 0x80
|
williamr@2
|
97 |
#define OCSP_NOCHECKS 0x100
|
williamr@2
|
98 |
#define OCSP_TRUSTOTHER 0x200
|
williamr@2
|
99 |
#define OCSP_RESPID_KEY 0x400
|
williamr@2
|
100 |
#define OCSP_NOTIME 0x800
|
williamr@2
|
101 |
|
williamr@2
|
102 |
/* CertID ::= SEQUENCE {
|
williamr@2
|
103 |
* hashAlgorithm AlgorithmIdentifier,
|
williamr@2
|
104 |
* issuerNameHash OCTET STRING, -- Hash of Issuer's DN
|
williamr@2
|
105 |
* issuerKeyHash OCTET STRING, -- Hash of Issuers public key (excluding the tag & length fields)
|
williamr@2
|
106 |
* serialNumber CertificateSerialNumber }
|
williamr@2
|
107 |
*/
|
williamr@2
|
108 |
typedef struct ocsp_cert_id_st
|
williamr@2
|
109 |
{
|
williamr@2
|
110 |
X509_ALGOR *hashAlgorithm;
|
williamr@2
|
111 |
ASN1_OCTET_STRING *issuerNameHash;
|
williamr@2
|
112 |
ASN1_OCTET_STRING *issuerKeyHash;
|
williamr@2
|
113 |
ASN1_INTEGER *serialNumber;
|
williamr@2
|
114 |
} OCSP_CERTID;
|
williamr@2
|
115 |
|
williamr@2
|
116 |
DECLARE_STACK_OF(OCSP_CERTID)
|
williamr@2
|
117 |
|
williamr@2
|
118 |
/* Request ::= SEQUENCE {
|
williamr@2
|
119 |
* reqCert CertID,
|
williamr@2
|
120 |
* singleRequestExtensions [0] EXPLICIT Extensions OPTIONAL }
|
williamr@2
|
121 |
*/
|
williamr@2
|
122 |
typedef struct ocsp_one_request_st
|
williamr@2
|
123 |
{
|
williamr@2
|
124 |
OCSP_CERTID *reqCert;
|
williamr@2
|
125 |
STACK_OF(X509_EXTENSION) *singleRequestExtensions;
|
williamr@2
|
126 |
} OCSP_ONEREQ;
|
williamr@2
|
127 |
|
williamr@2
|
128 |
DECLARE_STACK_OF(OCSP_ONEREQ)
|
williamr@2
|
129 |
DECLARE_ASN1_SET_OF(OCSP_ONEREQ)
|
williamr@2
|
130 |
|
williamr@2
|
131 |
|
williamr@2
|
132 |
/* TBSRequest ::= SEQUENCE {
|
williamr@2
|
133 |
* version [0] EXPLICIT Version DEFAULT v1,
|
williamr@2
|
134 |
* requestorName [1] EXPLICIT GeneralName OPTIONAL,
|
williamr@2
|
135 |
* requestList SEQUENCE OF Request,
|
williamr@2
|
136 |
* requestExtensions [2] EXPLICIT Extensions OPTIONAL }
|
williamr@2
|
137 |
*/
|
williamr@2
|
138 |
typedef struct ocsp_req_info_st
|
williamr@2
|
139 |
{
|
williamr@2
|
140 |
ASN1_INTEGER *version;
|
williamr@2
|
141 |
GENERAL_NAME *requestorName;
|
williamr@2
|
142 |
STACK_OF(OCSP_ONEREQ) *requestList;
|
williamr@2
|
143 |
STACK_OF(X509_EXTENSION) *requestExtensions;
|
williamr@2
|
144 |
} OCSP_REQINFO;
|
williamr@2
|
145 |
|
williamr@2
|
146 |
/* Signature ::= SEQUENCE {
|
williamr@2
|
147 |
* signatureAlgorithm AlgorithmIdentifier,
|
williamr@2
|
148 |
* signature BIT STRING,
|
williamr@2
|
149 |
* certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
|
williamr@2
|
150 |
*/
|
williamr@2
|
151 |
typedef struct ocsp_signature_st
|
williamr@2
|
152 |
{
|
williamr@2
|
153 |
X509_ALGOR *signatureAlgorithm;
|
williamr@2
|
154 |
ASN1_BIT_STRING *signature;
|
williamr@2
|
155 |
STACK_OF(X509) *certs;
|
williamr@2
|
156 |
} OCSP_SIGNATURE;
|
williamr@2
|
157 |
|
williamr@2
|
158 |
/* OCSPRequest ::= SEQUENCE {
|
williamr@2
|
159 |
* tbsRequest TBSRequest,
|
williamr@2
|
160 |
* optionalSignature [0] EXPLICIT Signature OPTIONAL }
|
williamr@2
|
161 |
*/
|
williamr@2
|
162 |
typedef struct ocsp_request_st
|
williamr@2
|
163 |
{
|
williamr@2
|
164 |
OCSP_REQINFO *tbsRequest;
|
williamr@2
|
165 |
OCSP_SIGNATURE *optionalSignature; /* OPTIONAL */
|
williamr@2
|
166 |
} OCSP_REQUEST;
|
williamr@2
|
167 |
|
williamr@2
|
168 |
/* OCSPResponseStatus ::= ENUMERATED {
|
williamr@2
|
169 |
* successful (0), --Response has valid confirmations
|
williamr@2
|
170 |
* malformedRequest (1), --Illegal confirmation request
|
williamr@2
|
171 |
* internalError (2), --Internal error in issuer
|
williamr@2
|
172 |
* tryLater (3), --Try again later
|
williamr@2
|
173 |
* --(4) is not used
|
williamr@2
|
174 |
* sigRequired (5), --Must sign the request
|
williamr@2
|
175 |
* unauthorized (6) --Request unauthorized
|
williamr@2
|
176 |
* }
|
williamr@2
|
177 |
*/
|
williamr@2
|
178 |
#define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
williamr@2
|
179 |
#define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
williamr@2
|
180 |
#define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
williamr@2
|
181 |
#define OCSP_RESPONSE_STATUS_TRYLATER 3
|
williamr@2
|
182 |
#define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
williamr@2
|
183 |
#define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
williamr@2
|
184 |
|
williamr@2
|
185 |
/* ResponseBytes ::= SEQUENCE {
|
williamr@2
|
186 |
* responseType OBJECT IDENTIFIER,
|
williamr@2
|
187 |
* response OCTET STRING }
|
williamr@2
|
188 |
*/
|
williamr@2
|
189 |
typedef struct ocsp_resp_bytes_st
|
williamr@2
|
190 |
{
|
williamr@2
|
191 |
ASN1_OBJECT *responseType;
|
williamr@2
|
192 |
ASN1_OCTET_STRING *response;
|
williamr@2
|
193 |
} OCSP_RESPBYTES;
|
williamr@2
|
194 |
|
williamr@2
|
195 |
/* OCSPResponse ::= SEQUENCE {
|
williamr@2
|
196 |
* responseStatus OCSPResponseStatus,
|
williamr@2
|
197 |
* responseBytes [0] EXPLICIT ResponseBytes OPTIONAL }
|
williamr@2
|
198 |
*/
|
williamr@2
|
199 |
typedef struct ocsp_response_st
|
williamr@2
|
200 |
{
|
williamr@2
|
201 |
ASN1_ENUMERATED *responseStatus;
|
williamr@2
|
202 |
OCSP_RESPBYTES *responseBytes;
|
williamr@2
|
203 |
} OCSP_RESPONSE;
|
williamr@2
|
204 |
|
williamr@2
|
205 |
/* ResponderID ::= CHOICE {
|
williamr@2
|
206 |
* byName [1] Name,
|
williamr@2
|
207 |
* byKey [2] KeyHash }
|
williamr@2
|
208 |
*/
|
williamr@2
|
209 |
#define V_OCSP_RESPID_NAME 0
|
williamr@2
|
210 |
#define V_OCSP_RESPID_KEY 1
|
williamr@2
|
211 |
typedef struct ocsp_responder_id_st
|
williamr@2
|
212 |
{
|
williamr@2
|
213 |
int type;
|
williamr@2
|
214 |
union {
|
williamr@2
|
215 |
X509_NAME* byName;
|
williamr@2
|
216 |
ASN1_OCTET_STRING *byKey;
|
williamr@2
|
217 |
} value;
|
williamr@2
|
218 |
} OCSP_RESPID;
|
williamr@2
|
219 |
/* KeyHash ::= OCTET STRING --SHA-1 hash of responder's public key
|
williamr@2
|
220 |
* --(excluding the tag and length fields)
|
williamr@2
|
221 |
*/
|
williamr@2
|
222 |
|
williamr@2
|
223 |
/* RevokedInfo ::= SEQUENCE {
|
williamr@2
|
224 |
* revocationTime GeneralizedTime,
|
williamr@2
|
225 |
* revocationReason [0] EXPLICIT CRLReason OPTIONAL }
|
williamr@2
|
226 |
*/
|
williamr@2
|
227 |
typedef struct ocsp_revoked_info_st
|
williamr@2
|
228 |
{
|
williamr@2
|
229 |
ASN1_GENERALIZEDTIME *revocationTime;
|
williamr@2
|
230 |
ASN1_ENUMERATED *revocationReason;
|
williamr@2
|
231 |
} OCSP_REVOKEDINFO;
|
williamr@2
|
232 |
|
williamr@2
|
233 |
/* CertStatus ::= CHOICE {
|
williamr@2
|
234 |
* good [0] IMPLICIT NULL,
|
williamr@2
|
235 |
* revoked [1] IMPLICIT RevokedInfo,
|
williamr@2
|
236 |
* unknown [2] IMPLICIT UnknownInfo }
|
williamr@2
|
237 |
*/
|
williamr@2
|
238 |
#define V_OCSP_CERTSTATUS_GOOD 0
|
williamr@2
|
239 |
#define V_OCSP_CERTSTATUS_REVOKED 1
|
williamr@2
|
240 |
#define V_OCSP_CERTSTATUS_UNKNOWN 2
|
williamr@2
|
241 |
typedef struct ocsp_cert_status_st
|
williamr@2
|
242 |
{
|
williamr@2
|
243 |
int type;
|
williamr@2
|
244 |
union {
|
williamr@2
|
245 |
ASN1_NULL *good;
|
williamr@2
|
246 |
OCSP_REVOKEDINFO *revoked;
|
williamr@2
|
247 |
ASN1_NULL *unknown;
|
williamr@2
|
248 |
} value;
|
williamr@2
|
249 |
} OCSP_CERTSTATUS;
|
williamr@2
|
250 |
|
williamr@2
|
251 |
/* SingleResponse ::= SEQUENCE {
|
williamr@2
|
252 |
* certID CertID,
|
williamr@2
|
253 |
* certStatus CertStatus,
|
williamr@2
|
254 |
* thisUpdate GeneralizedTime,
|
williamr@2
|
255 |
* nextUpdate [0] EXPLICIT GeneralizedTime OPTIONAL,
|
williamr@2
|
256 |
* singleExtensions [1] EXPLICIT Extensions OPTIONAL }
|
williamr@2
|
257 |
*/
|
williamr@2
|
258 |
typedef struct ocsp_single_response_st
|
williamr@2
|
259 |
{
|
williamr@2
|
260 |
OCSP_CERTID *certId;
|
williamr@2
|
261 |
OCSP_CERTSTATUS *certStatus;
|
williamr@2
|
262 |
ASN1_GENERALIZEDTIME *thisUpdate;
|
williamr@2
|
263 |
ASN1_GENERALIZEDTIME *nextUpdate;
|
williamr@2
|
264 |
STACK_OF(X509_EXTENSION) *singleExtensions;
|
williamr@2
|
265 |
} OCSP_SINGLERESP;
|
williamr@2
|
266 |
|
williamr@2
|
267 |
DECLARE_STACK_OF(OCSP_SINGLERESP)
|
williamr@2
|
268 |
DECLARE_ASN1_SET_OF(OCSP_SINGLERESP)
|
williamr@2
|
269 |
|
williamr@2
|
270 |
/* ResponseData ::= SEQUENCE {
|
williamr@2
|
271 |
* version [0] EXPLICIT Version DEFAULT v1,
|
williamr@2
|
272 |
* responderID ResponderID,
|
williamr@2
|
273 |
* producedAt GeneralizedTime,
|
williamr@2
|
274 |
* responses SEQUENCE OF SingleResponse,
|
williamr@2
|
275 |
* responseExtensions [1] EXPLICIT Extensions OPTIONAL }
|
williamr@2
|
276 |
*/
|
williamr@2
|
277 |
typedef struct ocsp_response_data_st
|
williamr@2
|
278 |
{
|
williamr@2
|
279 |
ASN1_INTEGER *version;
|
williamr@2
|
280 |
OCSP_RESPID *responderId;
|
williamr@2
|
281 |
ASN1_GENERALIZEDTIME *producedAt;
|
williamr@2
|
282 |
STACK_OF(OCSP_SINGLERESP) *responses;
|
williamr@2
|
283 |
STACK_OF(X509_EXTENSION) *responseExtensions;
|
williamr@2
|
284 |
} OCSP_RESPDATA;
|
williamr@2
|
285 |
|
williamr@2
|
286 |
/* BasicOCSPResponse ::= SEQUENCE {
|
williamr@2
|
287 |
* tbsResponseData ResponseData,
|
williamr@2
|
288 |
* signatureAlgorithm AlgorithmIdentifier,
|
williamr@2
|
289 |
* signature BIT STRING,
|
williamr@2
|
290 |
* certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
|
williamr@2
|
291 |
*/
|
williamr@2
|
292 |
/* Note 1:
|
williamr@2
|
293 |
The value for "signature" is specified in the OCSP rfc2560 as follows:
|
williamr@2
|
294 |
"The value for the signature SHALL be computed on the hash of the DER
|
williamr@2
|
295 |
encoding ResponseData." This means that you must hash the DER-encoded
|
williamr@2
|
296 |
tbsResponseData, and then run it through a crypto-signing function, which
|
williamr@2
|
297 |
will (at least w/RSA) do a hash-'n'-private-encrypt operation. This seems
|
williamr@2
|
298 |
a bit odd, but that's the spec. Also note that the data structures do not
|
williamr@2
|
299 |
leave anywhere to independently specify the algorithm used for the initial
|
williamr@2
|
300 |
hash. So, we look at the signature-specification algorithm, and try to do
|
williamr@2
|
301 |
something intelligent. -- Kathy Weinhold, CertCo */
|
williamr@2
|
302 |
/* Note 2:
|
williamr@2
|
303 |
It seems that the mentioned passage from RFC 2560 (section 4.2.1) is open
|
williamr@2
|
304 |
for interpretation. I've done tests against another responder, and found
|
williamr@2
|
305 |
that it doesn't do the double hashing that the RFC seems to say one
|
williamr@2
|
306 |
should. Therefore, all relevant functions take a flag saying which
|
williamr@2
|
307 |
variant should be used. -- Richard Levitte, OpenSSL team and CeloCom */
|
williamr@2
|
308 |
typedef struct ocsp_basic_response_st
|
williamr@2
|
309 |
{
|
williamr@2
|
310 |
OCSP_RESPDATA *tbsResponseData;
|
williamr@2
|
311 |
X509_ALGOR *signatureAlgorithm;
|
williamr@2
|
312 |
ASN1_BIT_STRING *signature;
|
williamr@2
|
313 |
STACK_OF(X509) *certs;
|
williamr@2
|
314 |
} OCSP_BASICRESP;
|
williamr@2
|
315 |
|
williamr@2
|
316 |
/*
|
williamr@2
|
317 |
* CRLReason ::= ENUMERATED {
|
williamr@2
|
318 |
* unspecified (0),
|
williamr@2
|
319 |
* keyCompromise (1),
|
williamr@2
|
320 |
* cACompromise (2),
|
williamr@2
|
321 |
* affiliationChanged (3),
|
williamr@2
|
322 |
* superseded (4),
|
williamr@2
|
323 |
* cessationOfOperation (5),
|
williamr@2
|
324 |
* certificateHold (6),
|
williamr@2
|
325 |
* removeFromCRL (8) }
|
williamr@2
|
326 |
*/
|
williamr@2
|
327 |
#define OCSP_REVOKED_STATUS_NOSTATUS -1
|
williamr@2
|
328 |
#define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
williamr@2
|
329 |
#define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
williamr@2
|
330 |
#define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
williamr@2
|
331 |
#define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
williamr@2
|
332 |
#define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
williamr@2
|
333 |
#define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
williamr@2
|
334 |
#define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
williamr@2
|
335 |
#define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
williamr@2
|
336 |
|
williamr@2
|
337 |
/* CrlID ::= SEQUENCE {
|
williamr@2
|
338 |
* crlUrl [0] EXPLICIT IA5String OPTIONAL,
|
williamr@2
|
339 |
* crlNum [1] EXPLICIT INTEGER OPTIONAL,
|
williamr@2
|
340 |
* crlTime [2] EXPLICIT GeneralizedTime OPTIONAL }
|
williamr@2
|
341 |
*/
|
williamr@2
|
342 |
typedef struct ocsp_crl_id_st
|
williamr@2
|
343 |
{
|
williamr@2
|
344 |
ASN1_IA5STRING *crlUrl;
|
williamr@2
|
345 |
ASN1_INTEGER *crlNum;
|
williamr@2
|
346 |
ASN1_GENERALIZEDTIME *crlTime;
|
williamr@2
|
347 |
} OCSP_CRLID;
|
williamr@2
|
348 |
|
williamr@2
|
349 |
/* ServiceLocator ::= SEQUENCE {
|
williamr@2
|
350 |
* issuer Name,
|
williamr@2
|
351 |
* locator AuthorityInfoAccessSyntax OPTIONAL }
|
williamr@2
|
352 |
*/
|
williamr@2
|
353 |
typedef struct ocsp_service_locator_st
|
williamr@2
|
354 |
{
|
williamr@2
|
355 |
X509_NAME* issuer;
|
williamr@2
|
356 |
STACK_OF(ACCESS_DESCRIPTION) *locator;
|
williamr@2
|
357 |
} OCSP_SERVICELOC;
|
williamr@2
|
358 |
|
williamr@2
|
359 |
#define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
williamr@2
|
360 |
#define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
williamr@2
|
361 |
|
williamr@2
|
362 |
#define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
|
williamr@2
|
363 |
|
williamr@2
|
364 |
#define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
|
williamr@2
|
365 |
|
williamr@2
|
366 |
#define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
williamr@2
|
367 |
(char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,bp,(char **)x,cb,NULL)
|
williamr@2
|
368 |
|
williamr@2
|
369 |
#define PEM_read_bio_OCSP_RESPONSE(bp,x,cb)(OCSP_RESPONSE *)PEM_ASN1_read_bio(\
|
williamr@2
|
370 |
(char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,bp,(char **)x,cb,NULL)
|
williamr@2
|
371 |
|
williamr@2
|
372 |
#define PEM_write_bio_OCSP_REQUEST(bp,o) \
|
williamr@2
|
373 |
PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\
|
williamr@2
|
374 |
bp,(char *)o, NULL,NULL,0,NULL,NULL)
|
williamr@2
|
375 |
|
williamr@2
|
376 |
#define PEM_write_bio_OCSP_RESPONSE(bp,o) \
|
williamr@2
|
377 |
PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
|
williamr@2
|
378 |
bp,(char *)o, NULL,NULL,0,NULL,NULL)
|
williamr@2
|
379 |
|
williamr@2
|
380 |
#define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
|
williamr@2
|
381 |
|
williamr@2
|
382 |
#define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
|
williamr@2
|
383 |
|
williamr@2
|
384 |
#define OCSP_REQUEST_sign(o,pkey,md) \
|
williamr@2
|
385 |
ASN1_item_sign(ASN1_ITEM_rptr(OCSP_REQINFO),\
|
williamr@2
|
386 |
o->optionalSignature->signatureAlgorithm,NULL,\
|
williamr@2
|
387 |
o->optionalSignature->signature,o->tbsRequest,pkey,md)
|
williamr@2
|
388 |
|
williamr@2
|
389 |
#define OCSP_BASICRESP_sign(o,pkey,md,d) \
|
williamr@2
|
390 |
ASN1_item_sign(ASN1_ITEM_rptr(OCSP_RESPDATA),o->signatureAlgorithm,NULL,\
|
williamr@2
|
391 |
o->signature,o->tbsResponseData,pkey,md)
|
williamr@2
|
392 |
|
williamr@2
|
393 |
#define OCSP_REQUEST_verify(a,r) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_REQINFO),\
|
williamr@2
|
394 |
a->optionalSignature->signatureAlgorithm,\
|
williamr@2
|
395 |
a->optionalSignature->signature,a->tbsRequest,r)
|
williamr@2
|
396 |
|
williamr@2
|
397 |
#define OCSP_BASICRESP_verify(a,r,d) ASN1_item_verify(ASN1_ITEM_rptr(OCSP_RESPDATA),\
|
williamr@2
|
398 |
a->signatureAlgorithm,a->signature,a->tbsResponseData,r)
|
williamr@2
|
399 |
|
williamr@2
|
400 |
#define ASN1_BIT_STRING_digest(data,type,md,len) \
|
williamr@2
|
401 |
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
williamr@2
|
402 |
|
williamr@2
|
403 |
#define OCSP_CERTID_dup(cid) ASN1_dup_of(OCSP_CERTID,i2d_OCSP_CERTID,d2i_OCSP_CERTID,cid)
|
williamr@2
|
404 |
|
williamr@2
|
405 |
#define OCSP_CERTSTATUS_dup(cs)\
|
williamr@2
|
406 |
(OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\
|
williamr@2
|
407 |
(char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs))
|
williamr@2
|
408 |
|
williamr@2
|
409 |
IMPORT_C OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, char *path, OCSP_REQUEST *req);
|
williamr@2
|
410 |
|
williamr@2
|
411 |
IMPORT_C OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
|
williamr@2
|
412 |
|
williamr@2
|
413 |
IMPORT_C OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
|
williamr@2
|
414 |
X509_NAME *issuerName,
|
williamr@2
|
415 |
ASN1_BIT_STRING* issuerKey,
|
williamr@2
|
416 |
ASN1_INTEGER *serialNumber);
|
williamr@2
|
417 |
|
williamr@2
|
418 |
IMPORT_C OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
|
williamr@2
|
419 |
|
williamr@2
|
420 |
IMPORT_C int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
|
williamr@2
|
421 |
IMPORT_C int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
|
williamr@2
|
422 |
IMPORT_C int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
|
williamr@2
|
423 |
IMPORT_C int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
|
williamr@2
|
424 |
|
williamr@2
|
425 |
IMPORT_C int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm);
|
williamr@2
|
426 |
IMPORT_C int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
williamr@2
|
427 |
|
williamr@2
|
428 |
IMPORT_C int OCSP_request_sign(OCSP_REQUEST *req,
|
williamr@2
|
429 |
X509 *signer,
|
williamr@2
|
430 |
EVP_PKEY *key,
|
williamr@2
|
431 |
const EVP_MD *dgst,
|
williamr@2
|
432 |
STACK_OF(X509) *certs,
|
williamr@2
|
433 |
unsigned long flags);
|
williamr@2
|
434 |
|
williamr@2
|
435 |
IMPORT_C int OCSP_response_status(OCSP_RESPONSE *resp);
|
williamr@2
|
436 |
IMPORT_C OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
|
williamr@2
|
437 |
|
williamr@2
|
438 |
IMPORT_C int OCSP_resp_count(OCSP_BASICRESP *bs);
|
williamr@2
|
439 |
IMPORT_C OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
|
williamr@2
|
440 |
IMPORT_C int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
|
williamr@2
|
441 |
IMPORT_C int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
|
williamr@2
|
442 |
ASN1_GENERALIZEDTIME **revtime,
|
williamr@2
|
443 |
ASN1_GENERALIZEDTIME **thisupd,
|
williamr@2
|
444 |
ASN1_GENERALIZEDTIME **nextupd);
|
williamr@2
|
445 |
IMPORT_C int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
|
williamr@2
|
446 |
int *reason,
|
williamr@2
|
447 |
ASN1_GENERALIZEDTIME **revtime,
|
williamr@2
|
448 |
ASN1_GENERALIZEDTIME **thisupd,
|
williamr@2
|
449 |
ASN1_GENERALIZEDTIME **nextupd);
|
williamr@2
|
450 |
IMPORT_C int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
|
williamr@2
|
451 |
ASN1_GENERALIZEDTIME *nextupd,
|
williamr@2
|
452 |
long sec, long maxsec);
|
williamr@2
|
453 |
|
williamr@2
|
454 |
IMPORT_C int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, X509_STORE *store, unsigned long flags);
|
williamr@2
|
455 |
|
williamr@2
|
456 |
IMPORT_C int OCSP_parse_url(char *url, char **phost, char **pport, char **ppath, int *pssl);
|
williamr@2
|
457 |
|
williamr@2
|
458 |
IMPORT_C int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
|
williamr@2
|
459 |
IMPORT_C int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
|
williamr@2
|
460 |
|
williamr@2
|
461 |
IMPORT_C int OCSP_request_onereq_count(OCSP_REQUEST *req);
|
williamr@2
|
462 |
IMPORT_C OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
|
williamr@2
|
463 |
IMPORT_C OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
|
williamr@2
|
464 |
IMPORT_C int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
|
williamr@2
|
465 |
ASN1_OCTET_STRING **pikeyHash,
|
williamr@2
|
466 |
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
williamr@2
|
467 |
IMPORT_C int OCSP_request_is_signed(OCSP_REQUEST *req);
|
williamr@2
|
468 |
IMPORT_C OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
|
williamr@2
|
469 |
IMPORT_C OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
|
williamr@2
|
470 |
OCSP_CERTID *cid,
|
williamr@2
|
471 |
int status, int reason,
|
williamr@2
|
472 |
ASN1_TIME *revtime,
|
williamr@2
|
473 |
ASN1_TIME *thisupd, ASN1_TIME *nextupd);
|
williamr@2
|
474 |
IMPORT_C int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
|
williamr@2
|
475 |
IMPORT_C int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
williamr@2
|
476 |
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
williamr@2
|
477 |
STACK_OF(X509) *certs, unsigned long flags);
|
williamr@2
|
478 |
|
williamr@2
|
479 |
IMPORT_C ASN1_STRING *ASN1_STRING_encode(ASN1_STRING *s, i2d_of_void *i2d,
|
williamr@2
|
480 |
void *data, STACK_OF(ASN1_OBJECT) *sk);
|
williamr@2
|
481 |
#define ASN1_STRING_encode_of(type,s,i2d,data,sk) \
|
williamr@2
|
482 |
ASN1_STRING_encode(s, CHECKED_I2D_OF(type, i2d), data, sk)
|
williamr@2
|
483 |
|
williamr@2
|
484 |
IMPORT_C X509_EXTENSION *OCSP_crlID_new(char *url, long *n, char *tim);
|
williamr@2
|
485 |
|
williamr@2
|
486 |
IMPORT_C X509_EXTENSION *OCSP_accept_responses_new(char **oids);
|
williamr@2
|
487 |
|
williamr@2
|
488 |
IMPORT_C X509_EXTENSION *OCSP_archive_cutoff_new(char* tim);
|
williamr@2
|
489 |
|
williamr@2
|
490 |
IMPORT_C X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME* issuer, char **urls);
|
williamr@2
|
491 |
|
williamr@2
|
492 |
IMPORT_C int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
williamr@2
|
493 |
IMPORT_C int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
williamr@2
|
494 |
IMPORT_C int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, ASN1_OBJECT *obj, int lastpos);
|
williamr@2
|
495 |
IMPORT_C int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
|
williamr@2
|
496 |
IMPORT_C X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
|
williamr@2
|
497 |
IMPORT_C X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
|
williamr@2
|
498 |
IMPORT_C void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, int *idx);
|
williamr@2
|
499 |
IMPORT_C int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
|
williamr@2
|
500 |
unsigned long flags);
|
williamr@2
|
501 |
IMPORT_C int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
|
williamr@2
|
502 |
|
williamr@2
|
503 |
IMPORT_C int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
|
williamr@2
|
504 |
IMPORT_C int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
|
williamr@2
|
505 |
IMPORT_C int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, ASN1_OBJECT *obj, int lastpos);
|
williamr@2
|
506 |
IMPORT_C int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
|
williamr@2
|
507 |
IMPORT_C X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
|
williamr@2
|
508 |
IMPORT_C X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
|
williamr@2
|
509 |
IMPORT_C void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
|
williamr@2
|
510 |
IMPORT_C int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
|
williamr@2
|
511 |
unsigned long flags);
|
williamr@2
|
512 |
IMPORT_C int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
|
williamr@2
|
513 |
|
williamr@2
|
514 |
IMPORT_C int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
|
williamr@2
|
515 |
IMPORT_C int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
|
williamr@2
|
516 |
IMPORT_C int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, ASN1_OBJECT *obj, int lastpos);
|
williamr@2
|
517 |
IMPORT_C int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int lastpos);
|
williamr@2
|
518 |
IMPORT_C X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
|
williamr@2
|
519 |
IMPORT_C X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
|
williamr@2
|
520 |
IMPORT_C void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, int *idx);
|
williamr@2
|
521 |
IMPORT_C int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, int crit,
|
williamr@2
|
522 |
unsigned long flags);
|
williamr@2
|
523 |
IMPORT_C int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
|
williamr@2
|
524 |
|
williamr@2
|
525 |
IMPORT_C int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
|
williamr@2
|
526 |
IMPORT_C int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
|
williamr@2
|
527 |
IMPORT_C int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, ASN1_OBJECT *obj, int lastpos);
|
williamr@2
|
528 |
IMPORT_C int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, int lastpos);
|
williamr@2
|
529 |
IMPORT_C X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
|
williamr@2
|
530 |
IMPORT_C X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
|
williamr@2
|
531 |
IMPORT_C void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, int *idx);
|
williamr@2
|
532 |
IMPORT_C int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, int crit,
|
williamr@2
|
533 |
unsigned long flags);
|
williamr@2
|
534 |
IMPORT_C int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
|
williamr@2
|
535 |
|
williamr@2
|
536 |
DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP)
|
williamr@2
|
537 |
DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS)
|
williamr@2
|
538 |
DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO)
|
williamr@2
|
539 |
DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP)
|
williamr@2
|
540 |
DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA)
|
williamr@2
|
541 |
DECLARE_ASN1_FUNCTIONS(OCSP_RESPID)
|
williamr@2
|
542 |
DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE)
|
williamr@2
|
543 |
DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES)
|
williamr@2
|
544 |
DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ)
|
williamr@2
|
545 |
DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)
|
williamr@2
|
546 |
DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST)
|
williamr@2
|
547 |
DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE)
|
williamr@2
|
548 |
DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO)
|
williamr@2
|
549 |
DECLARE_ASN1_FUNCTIONS(OCSP_CRLID)
|
williamr@2
|
550 |
DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC)
|
williamr@2
|
551 |
|
williamr@2
|
552 |
IMPORT_C char *OCSP_response_status_str(long s);
|
williamr@2
|
553 |
IMPORT_C char *OCSP_cert_status_str(long s);
|
williamr@2
|
554 |
IMPORT_C char *OCSP_crl_reason_str(long s);
|
williamr@2
|
555 |
|
williamr@2
|
556 |
IMPORT_C int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST* a, unsigned long flags);
|
williamr@2
|
557 |
IMPORT_C int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags);
|
williamr@2
|
558 |
|
williamr@2
|
559 |
IMPORT_C int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
williamr@2
|
560 |
X509_STORE *st, unsigned long flags);
|
williamr@2
|
561 |
|
williamr@2
|
562 |
/* BEGIN ERROR CODES */
|
williamr@2
|
563 |
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
williamr@2
|
564 |
* made after this point may be overwritten when the script is next run.
|
williamr@2
|
565 |
*/
|
williamr@2
|
566 |
IMPORT_C void ERR_load_OCSP_strings(void);
|
williamr@2
|
567 |
|
williamr@2
|
568 |
/* Error codes for the OCSP functions. */
|
williamr@2
|
569 |
|
williamr@2
|
570 |
/* Function codes. */
|
williamr@2
|
571 |
#define OCSP_F_ASN1_STRING_ENCODE 100
|
williamr@2
|
572 |
#define OCSP_F_D2I_OCSP_NONCE 102
|
williamr@2
|
573 |
#define OCSP_F_OCSP_BASIC_ADD1_STATUS 103
|
williamr@2
|
574 |
#define OCSP_F_OCSP_BASIC_SIGN 104
|
williamr@2
|
575 |
#define OCSP_F_OCSP_BASIC_VERIFY 105
|
williamr@2
|
576 |
#define OCSP_F_OCSP_CERT_ID_NEW 101
|
williamr@2
|
577 |
#define OCSP_F_OCSP_CHECK_DELEGATED 106
|
williamr@2
|
578 |
#define OCSP_F_OCSP_CHECK_IDS 107
|
williamr@2
|
579 |
#define OCSP_F_OCSP_CHECK_ISSUER 108
|
williamr@2
|
580 |
#define OCSP_F_OCSP_CHECK_VALIDITY 115
|
williamr@2
|
581 |
#define OCSP_F_OCSP_MATCH_ISSUERID 109
|
williamr@2
|
582 |
#define OCSP_F_OCSP_PARSE_URL 114
|
williamr@2
|
583 |
#define OCSP_F_OCSP_REQUEST_SIGN 110
|
williamr@2
|
584 |
#define OCSP_F_OCSP_REQUEST_VERIFY 116
|
williamr@2
|
585 |
#define OCSP_F_OCSP_RESPONSE_GET1_BASIC 111
|
williamr@2
|
586 |
#define OCSP_F_OCSP_SENDREQ_BIO 112
|
williamr@2
|
587 |
#define OCSP_F_REQUEST_VERIFY 113
|
williamr@2
|
588 |
|
williamr@2
|
589 |
/* Reason codes. */
|
williamr@2
|
590 |
#define OCSP_R_BAD_DATA 100
|
williamr@2
|
591 |
#define OCSP_R_CERTIFICATE_VERIFY_ERROR 101
|
williamr@2
|
592 |
#define OCSP_R_DIGEST_ERR 102
|
williamr@2
|
593 |
#define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122
|
williamr@2
|
594 |
#define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123
|
williamr@2
|
595 |
#define OCSP_R_ERROR_PARSING_URL 121
|
williamr@2
|
596 |
#define OCSP_R_MISSING_OCSPSIGNING_USAGE 103
|
williamr@2
|
597 |
#define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124
|
williamr@2
|
598 |
#define OCSP_R_NOT_BASIC_RESPONSE 104
|
williamr@2
|
599 |
#define OCSP_R_NO_CERTIFICATES_IN_CHAIN 105
|
williamr@2
|
600 |
#define OCSP_R_NO_CONTENT 106
|
williamr@2
|
601 |
#define OCSP_R_NO_PUBLIC_KEY 107
|
williamr@2
|
602 |
#define OCSP_R_NO_RESPONSE_DATA 108
|
williamr@2
|
603 |
#define OCSP_R_NO_REVOKED_TIME 109
|
williamr@2
|
604 |
#define OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 110
|
williamr@2
|
605 |
#define OCSP_R_REQUEST_NOT_SIGNED 128
|
williamr@2
|
606 |
#define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111
|
williamr@2
|
607 |
#define OCSP_R_ROOT_CA_NOT_TRUSTED 112
|
williamr@2
|
608 |
#define OCSP_R_SERVER_READ_ERROR 113
|
williamr@2
|
609 |
#define OCSP_R_SERVER_RESPONSE_ERROR 114
|
williamr@2
|
610 |
#define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 115
|
williamr@2
|
611 |
#define OCSP_R_SERVER_WRITE_ERROR 116
|
williamr@2
|
612 |
#define OCSP_R_SIGNATURE_FAILURE 117
|
williamr@2
|
613 |
#define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118
|
williamr@2
|
614 |
#define OCSP_R_STATUS_EXPIRED 125
|
williamr@2
|
615 |
#define OCSP_R_STATUS_NOT_YET_VALID 126
|
williamr@2
|
616 |
#define OCSP_R_STATUS_TOO_OLD 127
|
williamr@2
|
617 |
#define OCSP_R_UNKNOWN_MESSAGE_DIGEST 119
|
williamr@2
|
618 |
#define OCSP_R_UNKNOWN_NID 120
|
williamr@2
|
619 |
#define OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE 129
|
williamr@2
|
620 |
|
williamr@2
|
621 |
#ifdef __cplusplus
|
williamr@2
|
622 |
}
|
williamr@2
|
623 |
#endif
|
williamr@2
|
624 |
#endif
|