mirror of
https://github.com/servo/servo.git
synced 2025-06-06 00:25:37 +00:00
Only SSL CA certs
This commit is contained in:
parent
524331d232
commit
090dd9369f
7 changed files with 2763 additions and 6872 deletions
|
@ -26,4 +26,4 @@ git = "https://github.com/servo/rust-stb-image"
|
|||
[dependencies]
|
||||
url = "0.2.16"
|
||||
time = "0.1.12"
|
||||
openssl="*"
|
||||
openssl="0.2.15"
|
|
@ -68,7 +68,6 @@ fn load(load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
|
|||
|
||||
redirected_to.insert(url.clone());
|
||||
|
||||
|
||||
match url.scheme.as_slice() {
|
||||
"http" | "https" => {}
|
||||
_ => {
|
||||
|
@ -87,10 +86,12 @@ fn load(load_data: LoadData, start_chan: Sender<TargetedLoadResponse>) {
|
|||
ssl.set_CA_file(&certs);
|
||||
};
|
||||
|
||||
let ssl_err_string = "[UnknownError { library: \"SSL routines\", function: \"SSL3_GET_SERVER_CERTIFICATE\",\
|
||||
let ssl_err_string = "[UnknownError { library: \"SSL routines\", \
|
||||
function: \"SSL3_GET_SERVER_CERTIFICATE\", \
|
||||
reason: \"certificate verify failed\" }]";
|
||||
let mut req = match Request::with_connector(load_data.method.clone(), url.clone(),
|
||||
&mut HttpConnector(Some(box verifier as Box<FnMut(&mut SslContext)>))) {
|
||||
|
||||
let mut connector = HttpConnector(Some(box verifier as Box<FnMut(&mut SslContext)>));
|
||||
let mut req = match Request::with_connector(load_data.method.clone(), url.clone(), &mut connector) {
|
||||
Ok(req) => req,
|
||||
Err(HttpError::HttpIoError(IoError {kind: IoErrorKind::OtherIoError,
|
||||
desc: "Error in OpenSSL",
|
||||
|
|
6
components/servo/Cargo.lock
generated
6
components/servo/Cargo.lock
generated
|
@ -103,7 +103,7 @@ name = "cookie"
|
|||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -434,7 +434,7 @@ dependencies = [
|
|||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mucell 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -599,7 +599,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.2.16"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
@ -33,6 +33,7 @@ function getPEMString(cert)
|
|||
}
|
||||
|
||||
let certcache = Components.classes["@mozilla.org/security/nsscertcache;1"].createInstance(Ci.nsINSSCertCache);
|
||||
let certdb = Components.classes["@mozilla.org/security/x509certdb;1"].createInstance(Ci.nsIX509CertDB);
|
||||
certcache.cacheAllCerts();
|
||||
let enumerator = certcache.getX509CachedCerts().getEnumerator();
|
||||
let certlist = [];
|
||||
|
@ -40,9 +41,12 @@ let certstring="";
|
|||
while(enumerator.hasMoreElements()){
|
||||
let cert = enumerator.getNext().QueryInterface(Ci.nsIX509Cert);
|
||||
let pem = getPEMString(cert);
|
||||
certlist.push({name: cert.commonName, pem: pem});
|
||||
let trusted = certdb.isCertTrusted(cert, Ci.nsIX509Cert.CA_CERT, Ci.nsIX509CertDB.TRUSTED_SSL);
|
||||
certlist.push({name: cert.commonName, pem: pem, trusted: trusted});
|
||||
if (trusted) {
|
||||
certstring+=pem;
|
||||
}
|
||||
}
|
||||
|
||||
function save(path) {
|
||||
// https://developer.mozilla.org/en-US/Add-ons/Code_snippets/File_I_O
|
||||
|
|
38
ports/cef/Cargo.lock
generated
38
ports/cef/Cargo.lock
generated
|
@ -92,19 +92,19 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script_traits 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.1.9"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -285,7 +285,7 @@ dependencies = [
|
|||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -398,16 +398,16 @@ name = "hyper"
|
|||
version = "0.1.1"
|
||||
source = "git+https://github.com/servo/hyper?branch=servo#7f48a7e945180a4f762dc75236210d20a69b4a6a"
|
||||
dependencies = [
|
||||
"cookie 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cookie 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mucell 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unsafe-any 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -472,7 +472,7 @@ dependencies = [
|
|||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -537,7 +537,7 @@ dependencies = [
|
|||
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -556,13 +556,13 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.2.16"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -570,7 +570,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.2.16"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libressl-pnacl-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -657,7 +657,7 @@ dependencies = [
|
|||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.1.7 (git+https://github.com/rust-lang/uuid)",
|
||||
]
|
||||
|
@ -670,7 +670,7 @@ dependencies = [
|
|||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -688,7 +688,7 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -739,7 +739,7 @@ dependencies = [
|
|||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -772,7 +772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "0.2.17"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -792,7 +792,7 @@ dependencies = [
|
|||
"task_info 0.0.1",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
38
ports/gonk/Cargo.lock
generated
38
ports/gonk/Cargo.lock
generated
|
@ -63,19 +63,19 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script_traits 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cookie"
|
||||
version = "0.1.9"
|
||||
version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -256,7 +256,7 @@ dependencies = [
|
|||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -322,16 +322,16 @@ name = "hyper"
|
|||
version = "0.1.1"
|
||||
source = "git+https://github.com/servo/hyper?branch=servo#7f48a7e945180a4f762dc75236210d20a69b4a6a"
|
||||
dependencies = [
|
||||
"cookie 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cookie 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mime 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mucell 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"openssl 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicase 0.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unsafe-any 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -391,7 +391,7 @@ dependencies = [
|
|||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -456,7 +456,7 @@ dependencies = [
|
|||
"io_surface 0.1.0 (git+https://github.com/servo/rust-io-surface)",
|
||||
"layers 0.1.0 (git+https://github.com/servo/rust-layers)",
|
||||
"style 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -475,13 +475,13 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"stb_image 0.1.0 (git+https://github.com/servo/rust-stb-image)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "openssl"
|
||||
version = "0.2.16"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"openssl-sys 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -489,7 +489,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "openssl-sys"
|
||||
version = "0.2.16"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"libressl-pnacl-sys 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -576,7 +576,7 @@ dependencies = [
|
|||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"style 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
"uuid 0.1.7 (git+https://github.com/rust-lang/uuid)",
|
||||
]
|
||||
|
@ -589,7 +589,7 @@ dependencies = [
|
|||
"geom 0.1.0 (git+https://github.com/servo/rust-geom)",
|
||||
"msg 0.0.1",
|
||||
"net 0.0.1",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -606,7 +606,7 @@ dependencies = [
|
|||
"png 0.1.0 (git+https://github.com/servo/rust-png)",
|
||||
"script 0.0.1",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -657,7 +657,7 @@ dependencies = [
|
|||
"string_cache 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"string_cache_macros 0.0.0 (git+https://github.com/servo/string-cache)",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"util 0.0.1",
|
||||
]
|
||||
|
||||
|
@ -690,7 +690,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "url"
|
||||
version = "0.2.17"
|
||||
version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -710,7 +710,7 @@ dependencies = [
|
|||
"task_info 0.0.1",
|
||||
"text_writer 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"url 0.2.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
9532
resources/certs
9532
resources/certs
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue