1use super::super::*;
2use libc::*;
3
4pub enum OCSP_CERTID {}
5
6pub enum OCSP_ONEREQ {}
7
8pub enum OCSP_REQUEST {}
9
10pub enum OCSP_BASICRESP {}
11
12const_ptr_api! {
13 extern "C" {
14 pub fn OCSP_cert_to_id(
15 dgst: *const EVP_MD,
16 subject: #[const_ptr_if(any(ossl110, libressl281))] X509,
17 issuer: #[const_ptr_if(any(ossl110, libressl281))] X509,
18 ) -> *mut OCSP_CERTID;
19 }
20}
21
22extern "C" {
23 pub fn OCSP_request_add0_id(r: *mut OCSP_REQUEST, id: *mut OCSP_CERTID) -> *mut OCSP_ONEREQ;
24
25 pub fn OCSP_resp_find_status(
26 bs: *mut OCSP_BASICRESP,
27 id: *mut OCSP_CERTID,
28 status: *mut c_int,
29 reason: *mut c_int,
30 revtime: *mut *mut ASN1_GENERALIZEDTIME,
31 thisupd: *mut *mut ASN1_GENERALIZEDTIME,
32 nextupd: *mut *mut ASN1_GENERALIZEDTIME,
33 ) -> c_int;
34 pub fn OCSP_check_validity(
35 thisupd: *mut ASN1_GENERALIZEDTIME,
36 nextupd: *mut ASN1_GENERALIZEDTIME,
37 sec: c_long,
38 maxsec: c_long,
39 ) -> c_int;
40
41 pub fn OCSP_response_status(resp: *mut OCSP_RESPONSE) -> c_int;
42 pub fn OCSP_response_get1_basic(resp: *mut OCSP_RESPONSE) -> *mut OCSP_BASICRESP;
43
44 pub fn OCSP_response_create(status: c_int, bs: *mut OCSP_BASICRESP) -> *mut OCSP_RESPONSE;
45
46 pub fn OCSP_BASICRESP_new() -> *mut OCSP_BASICRESP;
47 pub fn OCSP_BASICRESP_free(r: *mut OCSP_BASICRESP);
48 pub fn OCSP_RESPONSE_new() -> *mut OCSP_RESPONSE;
49 pub fn OCSP_RESPONSE_free(r: *mut OCSP_RESPONSE);
50}
51
52const_ptr_api! {
53 extern "C" {
54 pub fn i2d_OCSP_RESPONSE(a: #[const_ptr_if(ossl300)] OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int;
55 }
56}
57
58extern "C" {
59 pub fn d2i_OCSP_RESPONSE(
60 a: *mut *mut OCSP_RESPONSE,
61 pp: *mut *const c_uchar,
62 length: c_long,
63 ) -> *mut OCSP_RESPONSE;
64 pub fn OCSP_ONEREQ_free(r: *mut OCSP_ONEREQ);
65 pub fn OCSP_CERTID_free(id: *mut OCSP_CERTID);
66 pub fn OCSP_REQUEST_new() -> *mut OCSP_REQUEST;
67 pub fn OCSP_REQUEST_free(r: *mut OCSP_REQUEST);
68}
69
70const_ptr_api! {
71 extern "C" {
72 pub fn i2d_OCSP_REQUEST(a: #[const_ptr_if(ossl300)] OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int;
73 }
74}
75
76extern "C" {
77 pub fn d2i_OCSP_REQUEST(
78 a: *mut *mut OCSP_REQUEST,
79 pp: *mut *const c_uchar,
80 length: c_long,
81 ) -> *mut OCSP_REQUEST;
82
83 pub fn OCSP_basic_verify(
84 bs: *mut OCSP_BASICRESP,
85 certs: *mut stack_st_X509,
86 st: *mut X509_STORE,
87 flags: c_ulong,
88 ) -> c_int;
89}
90