ocsp.h.in 16 KB

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