]>
Commit | Line | Data |
---|---|---|
0f113f3e | 1 | /* |
29f178bd | 2 | * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. |
eb64730b | 3 | * |
48f4ad77 | 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
21dcbebc RS |
5 | * this file except in compliance with the License. You can obtain a copy |
6 | * in the file LICENSE in the source distribution or at | |
7 | * https://www.openssl.org/source/license.html | |
eb64730b RL |
8 | */ |
9 | ||
ae4186b0 DMSP |
10 | #ifndef OPENSSL_OCSP_H |
11 | # define OPENSSL_OCSP_H | |
d86167ec DMSP |
12 | # pragma once |
13 | ||
14 | # include <openssl/macros.h> | |
936c2b9e | 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 |
d86167ec DMSP |
16 | # define HEADER_OCSP_H |
17 | # endif | |
eb64730b | 18 | |
5951e840 MC |
19 | #include <openssl/opensslconf.h> |
20 | ||
21 | /* | |
22 | * These definitions are outside the OPENSSL_NO_OCSP guard because although for | |
23 | * historical reasons they have OCSP_* names, they can actually be used | |
24 | * independently of OCSP. E.g. see RFC5280 | |
25 | */ | |
26 | /*- | |
27 | * CRLReason ::= ENUMERATED { | |
28 | * unspecified (0), | |
29 | * keyCompromise (1), | |
30 | * cACompromise (2), | |
31 | * affiliationChanged (3), | |
32 | * superseded (4), | |
33 | * cessationOfOperation (5), | |
34 | * certificateHold (6), | |
7960dbec DDO |
35 | * -- value 7 is not used |
36 | * removeFromCRL (8), | |
37 | * privilegeWithdrawn (9), | |
38 | * aACompromise (10) } | |
5951e840 MC |
39 | */ |
40 | # define OCSP_REVOKED_STATUS_NOSTATUS -1 | |
41 | # define OCSP_REVOKED_STATUS_UNSPECIFIED 0 | |
42 | # define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1 | |
43 | # define OCSP_REVOKED_STATUS_CACOMPROMISE 2 | |
44 | # define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3 | |
45 | # define OCSP_REVOKED_STATUS_SUPERSEDED 4 | |
46 | # define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5 | |
47 | # define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6 | |
48 | # define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8 | |
7960dbec DDO |
49 | # define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9 |
50 | # define OCSP_REVOKED_STATUS_AACOMPROMISE 10 | |
5951e840 MC |
51 | |
52 | ||
53 | # ifndef OPENSSL_NO_OCSP | |
54 | ||
50cd4768 | 55 | # include <openssl/types.h> |
5951e840 MC |
56 | # include <openssl/x509.h> |
57 | # include <openssl/x509v3.h> | |
58 | # include <openssl/safestack.h> | |
52df25cf | 59 | # include <openssl/ocsperr.h> |
eb64730b RL |
60 | |
61 | #ifdef __cplusplus | |
62 | extern "C" { | |
63 | #endif | |
64 | ||
0b33bc65 DSH |
65 | /* Various flags and values */ |
66 | ||
5951e840 MC |
67 | # define OCSP_DEFAULT_NONCE_LENGTH 16 |
68 | ||
69 | # define OCSP_NOCERTS 0x1 | |
70 | # define OCSP_NOINTERN 0x2 | |
71 | # define OCSP_NOSIGS 0x4 | |
72 | # define OCSP_NOCHAIN 0x8 | |
73 | # define OCSP_NOVERIFY 0x10 | |
74 | # define OCSP_NOEXPLICIT 0x20 | |
75 | # define OCSP_NOCASIGN 0x40 | |
76 | # define OCSP_NODELEGATED 0x80 | |
77 | # define OCSP_NOCHECKS 0x100 | |
78 | # define OCSP_TRUSTOTHER 0x200 | |
79 | # define OCSP_RESPID_KEY 0x400 | |
80 | # define OCSP_NOTIME 0x800 | |
0b33bc65 | 81 | |
6ef869d7 | 82 | typedef struct ocsp_cert_id_st OCSP_CERTID; |
eb64730b | 83 | |
85885715 | 84 | DEFINE_STACK_OF(OCSP_CERTID) |
73758d43 | 85 | |
6ef869d7 | 86 | typedef struct ocsp_one_request_st OCSP_ONEREQ; |
eb64730b | 87 | |
85885715 | 88 | DEFINE_STACK_OF(OCSP_ONEREQ) |
eb64730b | 89 | |
6ef869d7 DSH |
90 | typedef struct ocsp_req_info_st OCSP_REQINFO; |
91 | typedef struct ocsp_signature_st OCSP_SIGNATURE; | |
92 | typedef struct ocsp_request_st OCSP_REQUEST; | |
93 | ||
5951e840 MC |
94 | # define OCSP_RESPONSE_STATUS_SUCCESSFUL 0 |
95 | # define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1 | |
96 | # define OCSP_RESPONSE_STATUS_INTERNALERROR 2 | |
97 | # define OCSP_RESPONSE_STATUS_TRYLATER 3 | |
98 | # define OCSP_RESPONSE_STATUS_SIGREQUIRED 5 | |
99 | # define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6 | |
eb64730b | 100 | |
6ef869d7 DSH |
101 | typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES; |
102 | ||
5951e840 MC |
103 | # define V_OCSP_RESPID_NAME 0 |
104 | # define V_OCSP_RESPID_KEY 1 | |
67c8e7f4 | 105 | |
85885715 | 106 | DEFINE_STACK_OF(OCSP_RESPID) |
67c8e7f4 | 107 | |
6ef869d7 | 108 | typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO; |
eb64730b | 109 | |
5951e840 MC |
110 | # define V_OCSP_CERTSTATUS_GOOD 0 |
111 | # define V_OCSP_CERTSTATUS_REVOKED 1 | |
112 | # define V_OCSP_CERTSTATUS_UNKNOWN 2 | |
6ef869d7 DSH |
113 | |
114 | typedef struct ocsp_cert_status_st OCSP_CERTSTATUS; | |
115 | typedef struct ocsp_single_response_st OCSP_SINGLERESP; | |
eb64730b | 116 | |
85885715 | 117 | DEFINE_STACK_OF(OCSP_SINGLERESP) |
eb64730b | 118 | |
6ef869d7 DSH |
119 | typedef struct ocsp_response_data_st OCSP_RESPDATA; |
120 | ||
121 | typedef struct ocsp_basic_response_st OCSP_BASICRESP; | |
eb64730b | 122 | |
6ef869d7 DSH |
123 | typedef struct ocsp_crl_id_st OCSP_CRLID; |
124 | typedef struct ocsp_service_locator_st OCSP_SERVICELOC; | |
0f113f3e | 125 | |
5951e840 MC |
126 | # define PEM_STRING_OCSP_REQUEST "OCSP REQUEST" |
127 | # define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE" | |
eb64730b | 128 | |
5951e840 | 129 | # define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p) |
eb64730b | 130 | |
5951e840 | 131 | # define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p) |
eb64730b | 132 | |
5951e840 | 133 | # define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \ |
37659ea4 BE |
134 | (char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \ |
135 | bp,(char **)(x),cb,NULL) | |
eb64730b | 136 | |
8caab503 | 137 | # define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\ |
37659ea4 BE |
138 | (char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \ |
139 | bp,(char **)(x),cb,NULL) | |
eb64730b | 140 | |
5951e840 | 141 | # define PEM_write_bio_OCSP_REQUEST(bp,o) \ |
eb64730b | 142 | PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\ |
37659ea4 | 143 | bp,(char *)(o), NULL,NULL,0,NULL,NULL) |
eb64730b | 144 | |
5951e840 | 145 | # define PEM_write_bio_OCSP_RESPONSE(bp,o) \ |
eb64730b | 146 | PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\ |
37659ea4 | 147 | bp,(char *)(o), NULL,NULL,0,NULL,NULL) |
eb64730b | 148 | |
5951e840 | 149 | # define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o) |
eb64730b | 150 | |
5951e840 | 151 | # define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o) |
eb64730b | 152 | |
5951e840 | 153 | # define ASN1_BIT_STRING_digest(data,type,md,len) \ |
0f113f3e | 154 | ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len) |
eb64730b | 155 | |
5951e840 | 156 | # define OCSP_CERTSTATUS_dup(cs)\ |
eb64730b | 157 | (OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\ |
0f113f3e | 158 | (char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs)) |
eb64730b | 159 | |
9fdcc21f | 160 | DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID) |
fb596f3b | 161 | |
c45a48c1 BL |
162 | OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req); |
163 | OCSP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, | |
0f113f3e | 164 | int maxline); |
29f178bd | 165 | # ifndef OPENSSL_NO_SOCK |
c1c6c0bf | 166 | int OCSP_sendreq_nbio(OCSP_RESPONSE **presp, OCSP_REQ_CTX *rctx); |
29f178bd DDO |
167 | # endif |
168 | /* The following functions are used only internally */ | |
169 | int OCSP_REQ_CTX_nbio(OCSP_REQ_CTX *rctx); | |
170 | OCSP_REQ_CTX *OCSP_REQ_CTX_new(BIO *wbio, BIO *rbio, | |
171 | int method_GET, int maxline, | |
172 | unsigned long max_resp_len, int timeout, | |
173 | const char *expected_content_type, | |
174 | int expect_asn1); | |
c1c6c0bf | 175 | void OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx); |
6f9076ff | 176 | void OCSP_set_max_response_length(OCSP_REQ_CTX *rctx, unsigned long len); |
29f178bd DDO |
177 | int OCSP_REQ_CTX_i2d(OCSP_REQ_CTX *rctx, const char *content_type, |
178 | const ASN1_ITEM *it, ASN1_VALUE *req); | |
179 | # ifndef OPENSSL_NO_SOCK | |
180 | ASN1_VALUE *OCSP_REQ_CTX_nbio_d2i(OCSP_REQ_CTX *rctx, const ASN1_ITEM *it); | |
181 | # endif | |
6f9076ff | 182 | BIO *OCSP_REQ_CTX_get0_mem_bio(OCSP_REQ_CTX *rctx); |
29f178bd DDO |
183 | int OCSP_REQ_CTX_http(OCSP_REQ_CTX *rctx, |
184 | const char *server, const char *port, const char *path); | |
18e503f3 | 185 | int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, |
0f113f3e | 186 | const char *name, const char *value); |
29f178bd DDO |
187 | /* End of functions used only internally */ |
188 | ||
189 | /* TODO: remove this (documented but) meanwhile obsolete function? */ | |
190 | int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, const OCSP_REQUEST *req); | |
bf0d176e | 191 | |
68c12bfc DSH |
192 | OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, |
193 | const X509 *issuer); | |
bf0d176e | 194 | |
0f113f3e | 195 | OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst, |
68c12bfc DSH |
196 | const X509_NAME *issuerName, |
197 | const ASN1_BIT_STRING *issuerKey, | |
198 | const ASN1_INTEGER *serialNumber); | |
eb64730b | 199 | |
0b33bc65 | 200 | OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid); |
26e083cc | 201 | |
0b33bc65 | 202 | int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len); |
46a58ab9 | 203 | int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len); |
0b33bc65 | 204 | int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs); |
26e083cc DSH |
205 | int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req); |
206 | ||
0b33bc65 DSH |
207 | int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm); |
208 | int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert); | |
eb64730b | 209 | |
0f113f3e MC |
210 | int OCSP_request_sign(OCSP_REQUEST *req, |
211 | X509 *signer, | |
212 | EVP_PKEY *key, | |
213 | const EVP_MD *dgst, | |
214 | STACK_OF(X509) *certs, unsigned long flags); | |
0b33bc65 DSH |
215 | |
216 | int OCSP_response_status(OCSP_RESPONSE *resp); | |
217 | OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); | |
eb64730b | 218 | |
79613ea8 | 219 | const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs); |
20c36721 PK |
220 | const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs); |
221 | const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs); | |
ce5886dd BK |
222 | int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, |
223 | STACK_OF(X509) *extra_certs); | |
6ef869d7 | 224 | |
b5524a3a DSH |
225 | int OCSP_resp_count(OCSP_BASICRESP *bs); |
226 | OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); | |
79613ea8 | 227 | const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs); |
02fb7cfe DSH |
228 | const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs); |
229 | int OCSP_resp_get0_id(const OCSP_BASICRESP *bs, | |
230 | const ASN1_OCTET_STRING **pid, | |
231 | const X509_NAME **pname); | |
db17e43d SS |
232 | int OCSP_resp_get1_id(const OCSP_BASICRESP *bs, |
233 | ASN1_OCTET_STRING **pid, | |
234 | X509_NAME **pname); | |
02fb7cfe | 235 | |
b5524a3a DSH |
236 | int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); |
237 | int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, | |
0f113f3e MC |
238 | ASN1_GENERALIZEDTIME **revtime, |
239 | ASN1_GENERALIZEDTIME **thisupd, | |
240 | ASN1_GENERALIZEDTIME **nextupd); | |
b5524a3a | 241 | int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, |
0f113f3e MC |
242 | int *reason, |
243 | ASN1_GENERALIZEDTIME **revtime, | |
244 | ASN1_GENERALIZEDTIME **thisupd, | |
245 | ASN1_GENERALIZEDTIME **nextupd); | |
f1965221 | 246 | int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, |
0f113f3e | 247 | ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec); |
b5524a3a | 248 | |
0f113f3e MC |
249 | int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, |
250 | X509_STORE *store, unsigned long flags); | |
eb64730b | 251 | |
29f178bd | 252 | # define OCSP_parse_url OSSL_HTTP_parse_url /* for backward compatibility */ |
67c18019 | 253 | |
cc6d9261 MC |
254 | int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); |
255 | int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b); | |
0b33bc65 | 256 | |
02e4fbed DSH |
257 | int OCSP_request_onereq_count(OCSP_REQUEST *req); |
258 | OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i); | |
259 | OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one); | |
260 | int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, | |
0f113f3e MC |
261 | ASN1_OCTET_STRING **pikeyHash, |
262 | ASN1_INTEGER **pserial, OCSP_CERTID *cid); | |
fafc7f98 | 263 | int OCSP_request_is_signed(OCSP_REQUEST *req); |
2b916952 | 264 | OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs); |
02e4fbed | 265 | OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp, |
0f113f3e MC |
266 | OCSP_CERTID *cid, |
267 | int status, int reason, | |
268 | ASN1_TIME *revtime, | |
269 | ASN1_TIME *thisupd, | |
270 | ASN1_TIME *nextupd); | |
02e4fbed | 271 | int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert); |
0f113f3e MC |
272 | int OCSP_basic_sign(OCSP_BASICRESP *brsp, |
273 | X509 *signer, EVP_PKEY *key, const EVP_MD *dgst, | |
274 | STACK_OF(X509) *certs, unsigned long flags); | |
b4dd21a7 DC |
275 | int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp, |
276 | X509 *signer, EVP_MD_CTX *ctx, | |
277 | STACK_OF(X509) *certs, unsigned long flags); | |
e12c0beb MC |
278 | int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert); |
279 | int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert); | |
a671b3e6 | 280 | int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert); |
eb64730b | 281 | |
a026fbf9 | 282 | X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim); |
eb64730b RL |
283 | |
284 | X509_EXTENSION *OCSP_accept_responses_new(char **oids); | |
285 | ||
0f113f3e | 286 | X509_EXTENSION *OCSP_archive_cutoff_new(char *tim); |
eb64730b | 287 | |
a026fbf9 | 288 | X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, const char **urls); |
eb64730b | 289 | |
ec558b65 DSH |
290 | int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x); |
291 | int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos); | |
c47ba4e9 | 292 | int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj, |
0f113f3e | 293 | int lastpos); |
ec558b65 DSH |
294 | int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos); |
295 | X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc); | |
296 | X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc); | |
0f113f3e MC |
297 | void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, |
298 | int *idx); | |
ec558b65 | 299 | int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, |
0f113f3e | 300 | unsigned long flags); |
ec558b65 DSH |
301 | int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc); |
302 | ||
303 | int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x); | |
304 | int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos); | |
c47ba4e9 | 305 | int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos); |
ec558b65 DSH |
306 | int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos); |
307 | X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc); | |
308 | X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc); | |
309 | void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx); | |
310 | int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, | |
0f113f3e | 311 | unsigned long flags); |
ec558b65 DSH |
312 | int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc); |
313 | ||
314 | int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x); | |
315 | int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos); | |
c47ba4e9 | 316 | int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj, |
0f113f3e MC |
317 | int lastpos); |
318 | int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, | |
319 | int lastpos); | |
ec558b65 DSH |
320 | X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc); |
321 | X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc); | |
0f113f3e MC |
322 | void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, |
323 | int *idx); | |
324 | int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, | |
325 | int crit, unsigned long flags); | |
ec558b65 DSH |
326 | int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc); |
327 | ||
328 | int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x); | |
329 | int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos); | |
c47ba4e9 | 330 | int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj, |
0f113f3e MC |
331 | int lastpos); |
332 | int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, | |
333 | int lastpos); | |
ec558b65 DSH |
334 | X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc); |
335 | X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc); | |
0f113f3e MC |
336 | void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, |
337 | int *idx); | |
338 | int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, | |
339 | int crit, unsigned long flags); | |
ec558b65 | 340 | int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc); |
79613ea8 | 341 | const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x); |
ec558b65 | 342 | |
c08523d8 | 343 | DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP) |
73e92de5 DSH |
344 | DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS) |
345 | DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO) | |
346 | DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP) | |
347 | DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA) | |
348 | DECLARE_ASN1_FUNCTIONS(OCSP_RESPID) | |
349 | DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE) | |
350 | DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES) | |
351 | DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ) | |
352 | DECLARE_ASN1_FUNCTIONS(OCSP_CERTID) | |
353 | DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST) | |
354 | DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE) | |
1f47ec53 | 355 | DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO) |
c08523d8 | 356 | DECLARE_ASN1_FUNCTIONS(OCSP_CRLID) |
c08523d8 | 357 | DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC) |
eb64730b | 358 | |
ebc06fba AP |
359 | const char *OCSP_response_status_str(long s); |
360 | const char *OCSP_cert_status_str(long s); | |
361 | const char *OCSP_crl_reason_str(long s); | |
73758d43 | 362 | |
0f113f3e MC |
363 | int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags); |
364 | int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags); | |
73e92de5 | 365 | |
9b4dc830 | 366 | int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs, |
0f113f3e | 367 | X509_STORE *st, unsigned long flags); |
73e92de5 | 368 | |
eb64730b | 369 | |
0cd0a820 | 370 | # ifdef __cplusplus |
eb64730b | 371 | } |
0cd0a820 | 372 | # endif |
29f178bd | 373 | # endif /* !defined OPENSSL_NO_OCSP */ |
eb64730b | 374 | #endif |