aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/dh.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-02-15 19:55:20 -0800
committerGitHub <[email protected]>2018-02-15 19:55:20 -0800
commit3db28a1e1279c1117d439d52dc2a159d94353222 (patch)
tree7fae739c5340afb3ce177f782f8b9c5c8c104283 /openssl/src/dh.rs
parentMerge pull request #838 from olehermanse/master (diff)
parentTweak features (diff)
downloadrust-openssl-3db28a1e1279c1117d439d52dc2a159d94353222.tar.xz
rust-openssl-3db28a1e1279c1117d439d52dc2a159d94353222.zip
Merge pull request #839 from sfackler/openssl111
OpenSSL 1.1.1 support
Diffstat (limited to 'openssl/src/dh.rs')
-rw-r--r--openssl/src/dh.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/openssl/src/dh.rs b/openssl/src/dh.rs
index bd0ecd17..58b4026c 100644
--- a/openssl/src/dh.rs
+++ b/openssl/src/dh.rs
@@ -83,8 +83,9 @@ impl Dh<Params> {
ffi::d2i_DHparams
}
- /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
- #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
+ /// 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)))]
pub fn get_1024_160() -> Result<Dh<Params>, ErrorStack> {
unsafe {
ffi::init();
@@ -92,8 +93,9 @@ impl Dh<Params> {
}
}
- /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
- #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
+ /// 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)))]
pub fn get_2048_224() -> Result<Dh<Params>, ErrorStack> {
unsafe {
ffi::init();
@@ -101,8 +103,9 @@ impl Dh<Params> {
}
}
- /// Requires the `v102` or `v110` features and OpenSSL 1.0.2 or OpenSSL 1.1.0.
- #[cfg(any(all(feature = "v102", ossl102), all(feature = "v110", ossl110)))]
+ /// 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)))]
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();