diff options
| author | Steven Fackler <[email protected]> | 2016-10-15 17:03:17 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2016-10-15 17:03:17 -0700 |
| commit | fdb4131064412cdd0542e55cc1187cebb52bcc58 (patch) | |
| tree | 80d538b8002fbc9574a21201a39af4bdff0c1cb9 /openssl/src/dh | |
| parent | Correctly bind BIO_new_mem_buf (diff) | |
| parent | Fix set_read_ahead signature (diff) | |
| download | rust-openssl-fdb4131064412cdd0542e55cc1187cebb52bcc58.tar.xz rust-openssl-fdb4131064412cdd0542e55cc1187cebb52bcc58.zip | |
Merge pull request #475 from sfackler/no-enums
Turn enums into structs
Diffstat (limited to 'openssl/src/dh')
| -rw-r--r-- | openssl/src/dh/mod.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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(); |