diff --git a/openssl-sys/build/expando.c b/openssl-sys/build/expando.c index c8bfac879b081c84a569a93a273126a22e0c04fb..44a7b27f8956faf474c187ddec24df2bfffd90b4 100644 --- a/openssl-sys/build/expando.c +++ b/openssl-sys/build/expando.c @@ -10,10 +10,18 @@ VERSION(LIBRESSL, LIBRESSL_VERSION_NUMBER) VERSION(OPENSSL, OPENSSL_VERSION_NUMBER) #endif +#ifdef OPENSSL_NO_BF +RUST_CONF_OPENSSL_NO_BF +#endif + #ifdef OPENSSL_NO_BUF_FREELISTS RUST_CONF_OPENSSL_NO_BUF_FREELISTS #endif +#ifdef OPENSSL_NO_CMS +RUST_CONF_OPENSSL_NO_CMS +#endif + #ifdef OPENSSL_NO_COMP RUST_CONF_OPENSSL_NO_COMP #endif @@ -46,6 +54,10 @@ RUST_CONF_OPENSSL_NO_PSK RUST_CONF_OPENSSL_NO_RFC3779 #endif +#ifdef OPENSSL_NO_RMD160 +RUST_CONF_OPENSSL_NO_RMD160 +#endif + #ifdef OPENSSL_NO_SHA RUST_CONF_OPENSSL_NO_SHA #endif diff --git a/openssl/src/hash.rs b/openssl/src/hash.rs index 1136b6b1489f3197cd68028641ce5e0a5f002e1a..4f8fe3762d1f929e043b8c4475efee4709633add 100644 --- a/openssl/src/hash.rs +++ b/openssl/src/hash.rs @@ -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()) } } diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs index b4e647c0768b489da2b8500f36c16ec3259cd78f..07ec23c95c5419f76168bd8ac427d2dcb351cc62 100644 --- a/openssl/src/lib.rs +++ b/openssl/src/lib.rs @@ -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; diff --git a/openssl/src/symm.rs b/openssl/src/symm.rs index 45c5dd9b3d61439783d9d9e0ce035cd08969aa94..beea446b583e1688a373c96e7463cfde04d743f8 100644 --- a/openssl/src/symm.rs +++ b/openssl/src/symm.rs @@ -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()) } }