summaryrefslogtreecommitdiff
path: root/openssl/src/dh.rs
diff options
context:
space:
mode:
authorSteven Fackler <sfackler@gmail.com>2018-02-14 22:04:29 -0800
committerSteven Fackler <sfackler@gmail.com>2018-02-14 22:11:24 -0800
commitf4ddd66b0314fa6d5f8eda9d1a13167612376c81 (patch)
tree7fae739c5340afb3ce177f782f8b9c5c8c104283 /openssl/src/dh.rs
parent9d3b02e58a6b63ffc50ee4017cb61f43794fed4c (diff)
downloadrust-openssl-f4ddd66b0314fa6d5f8eda9d1a13167612376c81.zip
Tweak features
We should keep the version features totally separate for now.
Diffstat (limited to 'openssl/src/dh.rs')
-rw-r--r--openssl/src/dh.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/openssl/src/dh.rs b/openssl/src/dh.rs
index 7dcb3390..58b4026c 100644
--- a/openssl/src/dh.rs
+++ b/openssl/src/dh.rs
@@ -84,7 +84,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)))]
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110),
+ all(feature = "v111", ossl111)))]
pub fn get_1024_160() -> Result<Dh<Params>, ErrorStack> {
unsafe {
ffi::init();
@@ -93,7 +94,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)))]
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110),
+ all(feature = "v111", ossl111)))]
pub fn get_2048_224() -> Result<Dh<Params>, ErrorStack> {
unsafe {
ffi::init();
@@ -102,7 +104,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)))]
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110),
+ all(feature = "v111", ossl111)))]
pub fn get_2048_256() -> Result<Dh<Params>, ErrorStack> {
unsafe {
ffi::init();
@@ -142,7 +145,8 @@ mod tests {
use ssl::{SslContext, SslMethod};
#[test]
- #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
+ #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110),
+ all(feature = "v111", ossl111)))]
fn test_dh_rfc5114() {
let mut ctx = SslContext::builder(SslMethod::tls()).unwrap();
let dh1 = Dh::get_1024_160().unwrap();