Add basic bindings to the API CRLs
This commit is contained in:
parent
7ef5e50e26
commit
3a4f96a73d
|
|
@ -341,8 +341,6 @@ cfg_if! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub enum X509_CRL {}
|
|
||||||
stack!(stack_st_X509_CRL);
|
|
||||||
|
|
||||||
pub enum X509_NAME {}
|
pub enum X509_NAME {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,13 @@ extern "C" {
|
||||||
user_data: *mut c_void,
|
user_data: *mut c_void,
|
||||||
) -> *mut X509;
|
) -> *mut X509;
|
||||||
pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int;
|
pub fn PEM_write_bio_X509(bio: *mut BIO, x509: *mut X509) -> c_int;
|
||||||
|
pub fn PEM_read_bio_X509_CRL(
|
||||||
|
bio: *mut BIO,
|
||||||
|
out: *mut *mut X509_CRL,
|
||||||
|
callback: pem_password_cb,
|
||||||
|
user_data: *mut c_void,
|
||||||
|
) -> *mut X509_CRL;
|
||||||
|
pub fn PEM_write_bio_X509_CRL(bio: *mut BIO, x509: *mut X509_CRL) -> c_int;
|
||||||
pub fn PEM_read_bio_X509_REQ(
|
pub fn PEM_read_bio_X509_REQ(
|
||||||
bio: *mut BIO,
|
bio: *mut BIO,
|
||||||
out: *mut *mut X509_REQ,
|
out: *mut *mut X509_REQ,
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,54 @@ cfg_if! {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub enum X509_REVOKED {}
|
||||||
|
stack!(stack_st_X509_REVOKED);
|
||||||
|
|
||||||
|
cfg_if! {
|
||||||
|
if #[cfg(ossl110)] {
|
||||||
|
pub enum X509_CRL {}
|
||||||
|
} else {
|
||||||
|
#[repr(C)]
|
||||||
|
pub struct X509_CRL {
|
||||||
|
pub crl: *mut X509_CRL_INFO,
|
||||||
|
sig_alg: *mut X509_ALGOR,
|
||||||
|
signature: *mut c_void,
|
||||||
|
references: c_int,
|
||||||
|
flags: c_int,
|
||||||
|
akid: *mut c_void,
|
||||||
|
idp: *mut c_void,
|
||||||
|
idp_flags: c_int,
|
||||||
|
idp_reasons: c_int,
|
||||||
|
crl_number: *mut ASN1_INTEGER,
|
||||||
|
base_crl_number: *mut ASN1_INTEGER,
|
||||||
|
sha1_hash: [c_uchar; 20],
|
||||||
|
issuers: *mut c_void,
|
||||||
|
meth: *const c_void,
|
||||||
|
meth_data: *mut c_void,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stack!(stack_st_X509_CRL);
|
||||||
|
|
||||||
|
cfg_if! {
|
||||||
|
if #[cfg(ossl110)] {
|
||||||
|
pub enum X509_CRL_INFO {}
|
||||||
|
} else {
|
||||||
|
#[repr(C)]
|
||||||
|
pub struct X509_CRL_INFO {
|
||||||
|
version: *mut ASN1_INTEGER,
|
||||||
|
sig_alg: *mut X509_ALGOR,
|
||||||
|
pub issuer: *mut X509_NAME,
|
||||||
|
pub lastUpdate: *mut ASN1_TIME,
|
||||||
|
pub nextUpdate: *mut ASN1_TIME,
|
||||||
|
revoked: *mut stack_st_X509_REVOKED,
|
||||||
|
extensions: *mut stack_st_X509_EXTENSION,
|
||||||
|
enc: ASN1_ENCODING,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(ossl110)] {
|
if #[cfg(ossl110)] {
|
||||||
pub enum X509_REQ {}
|
pub enum X509_REQ {}
|
||||||
|
|
@ -177,6 +225,15 @@ extern "C" {
|
||||||
|
|
||||||
pub fn X509_ALGOR_free(x: *mut X509_ALGOR);
|
pub fn X509_ALGOR_free(x: *mut X509_ALGOR);
|
||||||
|
|
||||||
|
pub fn X509_CRL_new() -> *mut X509_CRL;
|
||||||
|
pub fn X509_CRL_free(x: *mut X509_CRL);
|
||||||
|
pub fn d2i_X509_CRL(
|
||||||
|
a: *mut *mut X509_CRL,
|
||||||
|
pp: *mut *const c_uchar,
|
||||||
|
length: c_long,
|
||||||
|
) -> *mut X509_CRL;
|
||||||
|
pub fn i2d_X509_CRL(x: *mut X509_CRL, buf: *mut *mut u8) -> c_int;
|
||||||
|
|
||||||
pub fn X509_REQ_new() -> *mut X509_REQ;
|
pub fn X509_REQ_new() -> *mut X509_REQ;
|
||||||
pub fn X509_REQ_free(x: *mut X509_REQ);
|
pub fn X509_REQ_free(x: *mut X509_REQ);
|
||||||
pub fn d2i_X509_REQ(
|
pub fn d2i_X509_REQ(
|
||||||
|
|
@ -290,6 +347,20 @@ extern "C" {
|
||||||
#[cfg(any(ossl110, libressl273))]
|
#[cfg(any(ossl110, libressl273))]
|
||||||
pub fn X509_up_ref(x: *mut X509) -> c_int;
|
pub fn X509_up_ref(x: *mut X509) -> c_int;
|
||||||
|
|
||||||
|
pub fn X509_CRL_verify(req: *mut X509_CRL, pkey: *mut EVP_PKEY) -> c_int;
|
||||||
|
pub fn X509_CRL_get0_by_serial(
|
||||||
|
x: *mut X509_CRL,
|
||||||
|
ret: *mut *mut X509_REVOKED,
|
||||||
|
serial: *mut ASN1_INTEGER,
|
||||||
|
) -> c_int;
|
||||||
|
|
||||||
|
#[cfg(ossl110)]
|
||||||
|
pub fn X509_CRL_get0_nextUpdate(x: *const X509_CRL) -> *const ASN1_TIME;
|
||||||
|
#[cfg(ossl110)]
|
||||||
|
pub fn X509_CRL_get0_lastUpdate(x: *const X509_CRL) -> *const ASN1_TIME;
|
||||||
|
#[cfg(ossl110)]
|
||||||
|
pub fn X509_CRL_get_issuer(x: *const X509_CRL) -> *mut X509_NAME;
|
||||||
|
|
||||||
#[cfg(ossl110)]
|
#[cfg(ossl110)]
|
||||||
pub fn X509_get0_extensions(req: *const ::X509) -> *const stack_st_X509_EXTENSION;
|
pub fn X509_get0_extensions(req: *const ::X509) -> *const stack_st_X509_EXTENSION;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue