mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Use Result instead of panicking when the resource dir can't be found
This commit is contained in:
parent
20b1764d71
commit
ceb85795b1
11 changed files with 81 additions and 64 deletions
|
@ -29,7 +29,9 @@ const DEFAULT_CIPHERS: &'static str = concat!(
|
|||
|
||||
pub fn create_http_connector() -> Arc<Pool<Connector>> {
|
||||
let mut context = SslContext::new(SslMethod::Sslv23).unwrap();
|
||||
context.set_CA_file(&resources_dir_path().join("certs")).unwrap();
|
||||
context.set_CA_file(&resources_dir_path()
|
||||
.expect("Need certificate file to make network requests")
|
||||
.join("certs")).unwrap();
|
||||
context.set_cipher_list(DEFAULT_CIPHERS).unwrap();
|
||||
context.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
|
||||
let connector = HttpsConnector::new(ServoSslClient {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue