Unverified Commit ae494ccd authored by Steven Fackler's avatar Steven Fackler Committed by GitHub
Browse files

Merge pull request #1477 from coolreader18/stack_from_der

Add d2i_X509_bio to openssl-sys
parents 78caec6f 8c7aba73
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ pub const ERR_TXT_MALLOCED: c_int = 0x01;
pub const ERR_TXT_STRING: c_int = 0x02;

pub const ERR_LIB_PEM: c_int = 9;
pub const ERR_LIB_ASN1: c_int = 13;

const_fn! {
    pub const fn ERR_PACK(l: c_int, f: c_int, r: c_int) -> c_ulong {
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ use *;
extern "C" {
    pub fn OBJ_nid2ln(nid: c_int) -> *const c_char;
    pub fn OBJ_nid2sn(nid: c_int) -> *const c_char;
    pub fn OBJ_nid2obj(n: c_int) -> *mut ASN1_OBJECT;
    pub fn OBJ_obj2nid(o: *const ASN1_OBJECT) -> c_int;
    pub fn OBJ_obj2txt(
        buf: *mut c_char,
+35 −1
Original line number Diff line number Diff line
@@ -1010,7 +1010,41 @@ cfg_if! {
    }
}

pub enum COMP_CTX {}

cfg_if! {
    if #[cfg(ossl110)] {
        pub enum COMP_METHOD {}
    } else {
        #[repr(C)]
        pub struct COMP_METHOD {
            pub type_: c_int,
            pub name: *const c_char,
            init: Option<unsafe extern "C" fn(*mut COMP_CTX) -> c_int>,
            finish: Option<unsafe extern "C" fn(*mut COMP_CTX)>,
            compress: Option<
                unsafe extern "C" fn(
                    *mut COMP_CTX,
                    *mut c_uchar,
                    c_uint,
                    *mut c_uchar,
                    c_uint,
                ) -> c_int,
            >,
            expand: Option<
                unsafe extern "C" fn(
                    *mut COMP_CTX,
                    *mut c_uchar,
                    c_uint,
                    *mut c_uchar,
                    c_uint,
                ) -> c_int,
            >,
            ctrl: Option<unsafe extern "C" fn() -> c_long>,
            callback_ctrl: Option<unsafe extern "C" fn() -> c_long>,
        }
    }
}

cfg_if! {
    if #[cfg(any(ossl110, libressl280))] {
+2 −0
Original line number Diff line number Diff line
@@ -7,4 +7,6 @@ extern "C" {
    pub fn RAND_keep_random_devices_open(keep: c_int);

    pub fn RAND_status() -> c_int;

    pub fn RAND_add(buf: *const c_void, num: c_int, randomness: c_double);
}
+9 −0
Original line number Diff line number Diff line
@@ -998,6 +998,9 @@ extern "C" {
    );
    pub fn SSL_CTX_set_verify_depth(ctx: *mut SSL_CTX, depth: c_int);

    #[cfg(ossl111)]
    pub fn SSL_CTX_set_post_handshake_auth(ctx: *mut SSL_CTX, val: c_int);

    pub fn SSL_CTX_check_private_key(ctx: *const SSL_CTX) -> c_int;

    pub fn SSL_CTX_set_session_id_context(
@@ -1345,6 +1348,12 @@ cfg_if! {
    }
}

#[cfg(not(osslconf = "OPENSSL_NO_COMP"))]
extern "C" {
    #[cfg(ossl110)]
    pub fn COMP_get_type(meth: *const COMP_METHOD) -> i32;
}

extern "C" {
    #[cfg(ossl110)]
    pub fn SSL_CIPHER_get_cipher_nid(c: *const SSL_CIPHER) -> c_int;
Loading