From ee189885843b2b4f75f180ccc5b66689c3cdd553 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sat, 15 Oct 2016 16:10:03 -0700 Subject: De-enumify SslMethod --- openssl/src/dh/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'openssl/src/dh') diff --git a/openssl/src/dh/mod.rs b/openssl/src/dh/mod.rs index b716ffe0..83807f39 100644 --- a/openssl/src/dh/mod.rs +++ b/openssl/src/dh/mod.rs @@ -88,13 +88,12 @@ mod compat { mod tests { use super::DH; use bn::BigNum; - use ssl::SslContext; - use ssl::SslMethod::Tls; + use ssl::{SslMethod, SslContext}; #[test] #[cfg(feature = "openssl-102")] fn test_dh_rfc5114() { - let mut ctx = SslContext::new(Tls).unwrap(); + let mut ctx = SslContext::new(SslMethod::tls()).unwrap(); let dh1 = DH::get_1024_160().unwrap(); ctx.set_tmp_dh(&dh1).unwrap(); let dh2 = DH::get_2048_224().unwrap(); @@ -105,7 +104,7 @@ mod tests { #[test] fn test_dh() { - let mut ctx = SslContext::new(Tls).unwrap(); + let mut ctx = SslContext::new(SslMethod::tls()).unwrap(); let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435\ E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF429\ 6D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C02\ @@ -135,7 +134,7 @@ mod tests { #[test] fn test_dh_from_pem() { - let mut ctx = SslContext::new(Tls).unwrap(); + let mut ctx = SslContext::new(SslMethod::tls()).unwrap(); let params = include_bytes!("../../test/dhparams.pem"); let dh = DH::from_pem(params).ok().expect("Failed to load PEM"); ctx.set_tmp_dh(&dh).unwrap(); -- cgit v1.2.3