Commit f959bd58 authored by Steven Fackler's avatar Steven Fackler
Browse files

fixes

parent 203ca55c
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -8,15 +8,10 @@ extern "C" {
    pub fn CMS_ContentInfo_free(cms: *mut ::CMS_ContentInfo);
}

cfg_if! {
    if #[cfg(ossl300)] {
const_ptr_api! {
    extern "C" {
            pub fn i2d_CMS_ContentInfo(a: *const ::CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int;
        }
    } else if #[cfg(ossl101)] {
        extern "C" {
            pub fn i2d_CMS_ContentInfo(a: *mut ::CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int;
        }
        #[cfg(ossl101)]
        pub fn i2d_CMS_ContentInfo(a: #[const_ptr_if(ossl300)] CMS_ContentInfo, pp: *mut *mut c_uchar) -> c_int;
    }
}

+6 −18
Original line number Diff line number Diff line
@@ -84,15 +84,9 @@ extern "C" {
    pub fn OCSP_RESPONSE_free(r: *mut OCSP_RESPONSE);
}

cfg_if! {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn i2d_OCSP_RESPONSE(a: *const OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int;
        }
    } else {
const_ptr_api! {
    extern "C" {
            pub fn i2d_OCSP_RESPONSE(a: *mut OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int;
        }
        pub fn i2d_OCSP_RESPONSE(a: #[const_ptr_if(ossl300)] OCSP_RESPONSE, pp: *mut *mut c_uchar) -> c_int;
    }
}

@@ -108,15 +102,9 @@ extern "C" {
    pub fn OCSP_REQUEST_free(r: *mut OCSP_REQUEST);
}

cfg_if! {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn i2d_OCSP_REQUEST(a: *const OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int;
        }
    } else {
const_ptr_api! {
    extern "C" {
            pub fn i2d_OCSP_REQUEST(a: *mut OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int;
        }
        pub fn i2d_OCSP_REQUEST(a: #[const_ptr_if(ossl300)] OCSP_REQUEST, pp: *mut *mut c_uchar) -> c_int;
    }
}

+6 −6
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ const_ptr_api! {
            bp: *mut BIO,
            rsa: #[const_ptr_if(ossl300)] RSA,
            cipher: *const EVP_CIPHER,
            kstr: *const c_uchar,
            kstr: #[const_ptr_if(ossl300)] c_uchar,
            klen: c_int,
            callback: pem_password_cb,
            user_data: *mut c_void,
@@ -38,7 +38,7 @@ const_ptr_api! {
            bp: *mut BIO,
            dsa: #[const_ptr_if(ossl300)] DSA,
            cipher: *const EVP_CIPHER,
            kstr: *const c_uchar,
            kstr: #[const_ptr_if(ossl300)] c_uchar,
            klen: c_int,
            callback: pem_password_cb,
            user_data: *mut c_void,
@@ -47,17 +47,17 @@ const_ptr_api! {
            bio: *mut BIO,
            key: #[const_ptr_if(ossl300)] EC_KEY,
            cipher: *const EVP_CIPHER,
            kstr: *const c_uchar,
            kstr: #[const_ptr_if(ossl300)] c_uchar,
            klen: c_int,
            callback: pem_password_cb,
            user_data: *mut c_void,
        ) -> c_int;
        pub fn PEM_write_bio_DSA_PUBKEY(bp: *mut BIO, dsa: *const DSA) -> c_int;
        pub fn PEM_write_bio_DSA_PUBKEY(bp: *mut BIO, dsa: #[const_ptr_if(ossl300)] DSA) -> c_int;
        pub fn PEM_write_bio_PrivateKey(
            bio: *mut BIO,
            pkey: #[const_ptr_if(ossl300)] EVP_PKEY,
            cipher: *const EVP_CIPHER,
            kstr: *const c_uchar,
            kstr: #[const_ptr_if(ossl300)] c_uchar,
            klen: c_int,
            callback: pem_password_cb,
            user_data: *mut c_void,
@@ -67,7 +67,7 @@ const_ptr_api! {
            bio: *mut BIO,
            pkey: #[const_ptr_if(ossl300)] EVP_PKEY,
            cipher: *const EVP_CIPHER,
            kstr: *const c_char,
            kstr: #[const_ptr_if(ossl300)] c_char,
            klen: c_int,
            callback: pem_password_cb,
            user_data: *mut c_void,
+4 −20
Original line number Diff line number Diff line
@@ -7,15 +7,9 @@ pub enum PKCS12 {}
extern "C" {
    pub fn PKCS12_free(p12: *mut PKCS12);
}
cfg_if! {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn i2d_PKCS12(a: *const PKCS12, buf: *mut *mut u8) -> c_int;
        }
    } else {
const_ptr_api! {
    extern "C" {
            pub fn i2d_PKCS12(a: *mut PKCS12, buf: *mut *mut u8) -> c_int;
        }
        pub fn i2d_PKCS12(a: #[const_ptr_if(ossl300)] PKCS12, buf: *mut *mut u8) -> c_int;
    }
}
extern "C" {
@@ -43,17 +37,7 @@ const_ptr_api! {
            mac_iter: c_int,
            keytype: c_int,
        ) -> *mut PKCS12;
    }
}

cfg_if! {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn i2d_PKCS12_bio(b: *mut BIO, a: *const PKCS12) -> c_int;
        }
    } else {
        extern "C" {
            pub fn i2d_PKCS12_bio(b: *mut BIO, a: *mut PKCS12) -> c_int;
        }
        pub fn i2d_PKCS12_bio(b: *mut BIO, a: #[const_ptr_if(ossl300)] PKCS12) -> c_int;
    }
}
+3 −9
Original line number Diff line number Diff line
@@ -973,15 +973,9 @@ extern "C" {
    pub fn SSL_SESSION_up_ref(ses: *mut SSL_SESSION) -> c_int;
    pub fn SSL_SESSION_free(s: *mut SSL_SESSION);
}
cfg_if! {
    if #[cfg(ossl300)] {
        extern "C" {
            pub fn i2d_SSL_SESSION(s: *const SSL_SESSION, pp: *mut *mut c_uchar) -> c_int;
        }
    } else {
const_ptr_api! {
    extern "C" {
            pub fn i2d_SSL_SESSION(s: *mut SSL_SESSION, pp: *mut *mut c_uchar) -> c_int;
        }
        pub fn i2d_SSL_SESSION(s: #[const_ptr_if(ossl300)] SSL_SESSION, pp: *mut *mut c_uchar) -> c_int;
    }
}
extern "C" {
Loading