aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/connector.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/connector.rs')
-rw-r--r--components/net/connector.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/components/net/connector.rs b/components/net/connector.rs
index 659fb4b6ad9..58cfc8c3e81 100644
--- a/components/net/connector.rs
+++ b/components/net/connector.rs
@@ -52,12 +52,9 @@ pub type Connector = HttpsConnector;
pub fn create_ssl_client(ca_file: &PathBuf) -> OpensslClient {
let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
- {
- let context = ssl_connector_builder.builder_mut();
- context.set_ca_file(ca_file).expect("could not set CA file");
- context.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers");
- context.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
- }
+ ssl_connector_builder.set_ca_file(ca_file).expect("could not set CA file");
+ ssl_connector_builder.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers");
+ ssl_connector_builder.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
let ssl_connector = ssl_connector_builder.build();
OpensslClient::from(ssl_connector)
}