Only SSL CA certs

This commit is contained in:
Manish Goregaokar 2015-01-28 23:46:00 +05:30
parent 524331d232
commit 090dd9369f
7 changed files with 2763 additions and 6872 deletions

View file

@ -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"

View file

@ -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\",\
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 ssl_err_string = "[UnknownError { library: \"SSL routines\", \
function: \"SSL3_GET_SERVER_CERTIFICATE\", \
reason: \"certificate verify failed\" }]";
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",

View file

@ -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)",