Commit 61abe855 authored by Ruslan Sayfutdinov's avatar Ruslan Sayfutdinov
Browse files

Support OPENSSL_NO_RMD160, OPENSSL_NO_CMS, OPENSSL_NO_BF

parent 624effd3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ impl MessageDigest {
        unsafe { MessageDigest(ffi::EVP_shake256()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_RMD160"))]
    pub fn ripemd160() -> MessageDigest {
        unsafe { MessageDigest(ffi::EVP_ripemd160()) }
    }
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ pub mod aes;
pub mod asn1;
pub mod base64;
pub mod bn;
#[cfg(not(libressl))]
#[cfg(all(not(libressl), not(osslconf = "OPENSSL_NO_CMS")))]
pub mod cms;
pub mod conf;
pub mod derive;
+4 −0
Original line number Diff line number Diff line
@@ -224,18 +224,22 @@ impl Cipher {
        unsafe { Cipher(ffi::EVP_aes_256_ocb()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_BF"))]
    pub fn bf_cbc() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_cbc()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_BF"))]
    pub fn bf_ecb() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_ecb()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_BF"))]
    pub fn bf_cfb64() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_cfb64()) }
    }

    #[cfg(not(osslconf = "OPENSSL_NO_BF"))]
    pub fn bf_ofb() -> Cipher {
        unsafe { Cipher(ffi::EVP_bf_ofb()) }
    }