Commit f1342716 authored by Bernd Krietenstein's avatar Bernd Krietenstein
Browse files

Removed unnecessary cfg_if's.

parent 9f8c8216
Loading
Loading
Loading
Loading
+97 −155
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@ pub struct PKCS7_CTX {
    propq: *mut c_char,
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_SIGNED {
    pub version: *mut ASN1_INTEGER, /* version 1 */
@@ -19,13 +17,6 @@ cfg_if! {
    pub signer_info: *mut stack_st_PKCS7_SIGNER_INFO,
    pub contents: *mut PKCS7,
}
    } else {
        pub enum PKCS7_SIGNED {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_ENC_CONTENT {
    pub content_type: *mut ASN1_OBJECT,
@@ -35,26 +26,12 @@ cfg_if! {
    #[cfg(ossl300)]
    pub ctx: *const PKCS7_CTX,
}
    } else {
        pub enum PKCS7_ENC_CONTENT {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_ENVELOPE {
    pub version: *mut ASN1_INTEGER, /* version 0 */
    pub recipientinfo: *mut stack_st_PKCS7_RECIP_INFO,
    pub enc_data: *mut PKCS7_ENC_CONTENT,
}
    }  else {
        pub enum PKCS7_ENVELOPE {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_SIGN_ENVELOPE {
    pub version: *mut ASN1_INTEGER, /* version 1 */
@@ -65,13 +42,6 @@ cfg_if! {
    pub enc_data: *mut PKCS7_ENC_CONTENT,
    pub recipientinfo: *mut stack_st_PKCS7_RECIP_INFO
}
    } else {
        pub enum PKCS7_SIGN_ENVELOPE {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_DIGEST {
    pub version: *mut ASN1_INTEGER, /* version 0 */
@@ -79,22 +49,11 @@ cfg_if! {
    pub contents: *mut PKCS7,
    pub digest: *mut ASN1_OCTET_STRING,
}
    } else {
        pub enum PKCS7_DIGEST {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7_ENCRYPT {
    pub version: *mut ASN1_INTEGER, /* version 0 */
    pub enc_data: *mut PKCS7_ENC_CONTENT,
}
    } else {
        pub enum PKCS7_ENCRYPT {}
    }
}

extern "C" {
    pub fn PKCS7_SIGNED_free(info: *mut PKCS7_SIGNED);
@@ -108,8 +67,6 @@ extern "C" {
    pub fn PKCS7_RECIP_INFO_free(info: *mut PKCS7_RECIP_INFO);
}

cfg_if! {
    if #[cfg(any(ossl101, libressl251))] {
#[repr(C)]
pub struct PKCS7 {
    /*
@@ -133,6 +90,7 @@ cfg_if! {
    #[cfg(ossl300)]
    pub ctx: PKCS7_CTX,
}

#[repr(C)]
pub union PKCS7_data {
    pub ptr: *mut c_char,
@@ -151,25 +109,13 @@ cfg_if! {
    /* Anything else */
    pub other: *mut ASN1_TYPE,
}
    } else {
         pub enum PKCS7 {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl))] {
#[repr(C)]
pub struct PKCS7_ISSUER_AND_SERIAL {
    pub issuer: *mut X509_NAME,
    pub serial: *mut ASN1_INTEGER,
}
    } else {
        pub enum PKCS7_ISSUER_AND_SERIAL {}
    }
}

cfg_if! {
    if #[cfg(any(ossl101, libressl))] {
#[repr(C)]
pub struct PKCS7_SIGNER_INFO {
    pub version: *mut ASN1_INTEGER, /* version 1 */
@@ -183,10 +129,6 @@ cfg_if! {
    #[cfg(ossl300)]
    pub ctx: *const PKCS7_CTX,
}
    } else {
        pub enum PKCS7_SIGNER_INFO {}
    }
}

stack!(stack_st_PKCS7_SIGNER_INFO);