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