mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20402 - Eijebong:lazy_static, r=emilio
Dedupe lazy_static 🎉 🎉 🎉 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20402) <!-- Reviewable:end -->
This commit is contained in:
commit
34f388229d
3 changed files with 20 additions and 30 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue