Loading openssl/src/dh/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ mod tests { #[test] #[cfg(feature = "rfc5114")] fn test_dh_rfc5114() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let dh1 = DH::get_1024_160().unwrap(); ctx.set_tmp_dh(dh1).unwrap(); let dh2 = DH::get_2048_224().unwrap(); Loading @@ -92,7 +92,7 @@ mod tests { #[test] fn test_dh() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435\ E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF429\ 6D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C02\ Loading Loading @@ -122,7 +122,7 @@ mod tests { #[test] fn test_dh_from_pem() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let pem_path = Path::new("test/dhparams.pem"); let mut file = File::open(&pem_path) .ok() Loading openssl/src/ssl/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -521,13 +521,13 @@ impl SslContext { } } pub fn set_read_ahead(&self, m: u32) { pub fn set_read_ahead(&mut self, m: u32) { unsafe { ffi_extras::SSL_CTX_set_read_ahead(self.ctx, m as c_long); } } pub fn set_tmp_dh(&self, dh: DH) -> Result<(), ErrorStack> { pub fn set_tmp_dh(&mut self, dh: DH) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_set_tmp_dh(self.ctx, dh.raw()) as i32 }) } Loading Loading @@ -647,7 +647,7 @@ impl SslContext { SslContextOptions::from_bits(ret).unwrap() } pub fn options(&mut self) -> SslContextOptions { pub fn options(&self) -> SslContextOptions { let ret = unsafe { ffi_extras::SSL_CTX_get_options(self.ctx) }; SslContextOptions::from_bits(ret).unwrap() } Loading openssl/src/ssl/tests/mod.rs +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ fn test_set_certificate_and_private_key() { } run_test!(get_ctx_options, |method, _| { let mut ctx = SslContext::new(method).unwrap(); let ctx = SslContext::new(method).unwrap(); ctx.options(); }); Loading Loading
openssl/src/dh/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ mod tests { #[test] #[cfg(feature = "rfc5114")] fn test_dh_rfc5114() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let dh1 = DH::get_1024_160().unwrap(); ctx.set_tmp_dh(dh1).unwrap(); let dh2 = DH::get_2048_224().unwrap(); Loading @@ -92,7 +92,7 @@ mod tests { #[test] fn test_dh() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435\ E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF429\ 6D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C02\ Loading Loading @@ -122,7 +122,7 @@ mod tests { #[test] fn test_dh_from_pem() { let ctx = SslContext::new(Sslv23).unwrap(); let mut ctx = SslContext::new(Sslv23).unwrap(); let pem_path = Path::new("test/dhparams.pem"); let mut file = File::open(&pem_path) .ok() Loading
openssl/src/ssl/mod.rs +3 −3 Original line number Diff line number Diff line Loading @@ -521,13 +521,13 @@ impl SslContext { } } pub fn set_read_ahead(&self, m: u32) { pub fn set_read_ahead(&mut self, m: u32) { unsafe { ffi_extras::SSL_CTX_set_read_ahead(self.ctx, m as c_long); } } pub fn set_tmp_dh(&self, dh: DH) -> Result<(), ErrorStack> { pub fn set_tmp_dh(&mut self, dh: DH) -> Result<(), ErrorStack> { wrap_ssl_result(unsafe { ffi_extras::SSL_CTX_set_tmp_dh(self.ctx, dh.raw()) as i32 }) } Loading Loading @@ -647,7 +647,7 @@ impl SslContext { SslContextOptions::from_bits(ret).unwrap() } pub fn options(&mut self) -> SslContextOptions { pub fn options(&self) -> SslContextOptions { let ret = unsafe { ffi_extras::SSL_CTX_get_options(self.ctx) }; SslContextOptions::from_bits(ret).unwrap() } Loading
openssl/src/ssl/tests/mod.rs +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ fn test_set_certificate_and_private_key() { } run_test!(get_ctx_options, |method, _| { let mut ctx = SslContext::new(method).unwrap(); let ctx = SslContext::new(method).unwrap(); ctx.options(); }); Loading