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