diff options
| author | Steven Fackler <[email protected]> | 2018-03-18 21:17:49 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-03-19 00:41:33 -0700 |
| commit | 7c333469609bc08d740ebaef10a0234f23dd85b8 (patch) | |
| tree | dbea2b5fba0340804b4770753f556ef925b132c8 /openssl/src/dh.rs | |
| parent | Merge pull request #875 from Ralith/hash-extras (diff) | |
| download | rust-openssl-7c333469609bc08d740ebaef10a0234f23dd85b8.tar.xz rust-openssl-7c333469609bc08d740ebaef10a0234f23dd85b8.zip | |
Remove version-specific features
Closes #852
Diffstat (limited to 'openssl/src/dh.rs')
| -rw-r--r-- | openssl/src/dh.rs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/openssl/src/dh.rs b/openssl/src/dh.rs index 58b4026c..a90b10b8 100644 --- a/openssl/src/dh.rs +++ b/openssl/src/dh.rs @@ -83,9 +83,8 @@ impl Dh<Params> { ffi::d2i_DHparams } - /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature. - #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110), - all(feature = "v111", ossl111)))] + /// Requires OpenSSL 1.0.2 or newer. + #[cfg(any(ossl102, ossl110))] pub fn get_1024_160() -> Result<Dh<Params>, ErrorStack> { unsafe { ffi::init(); @@ -93,9 +92,8 @@ impl Dh<Params> { } } - /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature. - #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110), - all(feature = "v111", ossl111)))] + /// Requires OpenSSL 1.0.2 or newer. + #[cfg(any(ossl102, ossl110))] pub fn get_2048_224() -> Result<Dh<Params>, ErrorStack> { unsafe { ffi::init(); @@ -103,9 +101,8 @@ impl Dh<Params> { } } - /// Requires OpenSSL 1.0.2, 1.1.0, or 1.1.1 and the corresponding Cargo feature. - #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110), - all(feature = "v111", ossl111)))] + /// Requires OpenSSL 1.0.2 or newer. + #[cfg(any(ossl102, ossl110))] pub fn get_2048_256() -> Result<Dh<Params>, ErrorStack> { unsafe { ffi::init(); @@ -145,8 +142,7 @@ mod tests { use ssl::{SslContext, SslMethod}; #[test] - #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110), - all(feature = "v111", ossl111)))] + #[cfg(any(ossl102, ossl110))] fn test_dh_rfc5114() { let mut ctx = SslContext::builder(SslMethod::tls()).unwrap(); let dh1 = Dh::get_1024_160().unwrap(); |