mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #8637 - alex:disable-ssl, r=Manishearth
Always disable SSLv2 and SSLv3. These protocols have serious known weakness and our turned off in other browsers. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8637) <!-- Reviewable:end -->
This commit is contained in:
commit
ed65fd2970
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,7 @@ use net_traits::ProgressMsg::{Done, Payload};
|
|||
use net_traits::hosts::replace_hosts;
|
||||
use net_traits::{CookieSource, IncludeSubdomains, LoadConsumer, LoadData, Metadata};
|
||||
use openssl::ssl::error::{SslError, OpensslError};
|
||||
use openssl::ssl::{SSL_VERIFY_PEER, SslContext, SslMethod};
|
||||
use openssl::ssl::{SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3, SSL_VERIFY_PEER, SslContext, SslMethod};
|
||||
use resource_task::{CancellationListener, send_error, start_sending_sniffed_opt};
|
||||
use std::borrow::ToOwned;
|
||||
use std::boxed::FnBox;
|
||||
|
@ -65,6 +65,7 @@ pub fn create_http_connector() -> Arc<Pool<Connector>> {
|
|||
context.set_verify(SSL_VERIFY_PEER, None);
|
||||
context.set_CA_file(&resources_dir_path().join("certs")).unwrap();
|
||||
context.set_cipher_list(DEFAULT_CIPHERS).unwrap();
|
||||
context.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3);
|
||||
let connector = HttpsConnector::new(Openssl {
|
||||
context: Arc::new(context)
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue