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