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