diff --git a/Cargo.lock b/Cargo.lock index ba9726096f..ab421bb185 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6,6 +6,11 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "adler32" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "advapi32-sys" version = "0.2.0" @@ -56,7 +61,7 @@ dependencies = [ "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -108,13 +113,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "ca-loader" -version = "0.1.0" +name = "bytes" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "crypt32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -138,15 +142,6 @@ dependencies = [ "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "coco" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "conv" version = "0.3.3" @@ -155,15 +150,6 @@ dependencies = [ "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "cookie" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "core-foundation" version = "0.2.3" @@ -241,21 +227,21 @@ dependencies = [ [[package]] name = "download" -version = "0.3.0" +version = "0.4.0" dependencies = [ - "ca-loader 0.1.0", "curl 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "env_proxy 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-probe 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "dtoa" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "either" version = "1.1.0" @@ -309,6 +295,15 @@ name = "futures" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures-cpupool" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "gcc" version = "0.3.51" @@ -323,14 +318,6 @@ dependencies = [ "typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hpack" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "httparse" version = "1.2.3" @@ -338,22 +325,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.9.18" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", - "solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "hyper-tls" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -366,6 +369,15 @@ dependencies = [ "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "iovec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "itertools" version = "0.6.1" @@ -374,6 +386,11 @@ dependencies = [ "either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "itoa" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -402,11 +419,25 @@ name = "lazy_static" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "lazycell" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "libc" version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "libflate" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "adler32 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libz-sys" version = "1.0.16" @@ -482,10 +513,10 @@ dependencies = [ [[package]] name = "mime" -version = "0.2.6" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -497,6 +528,41 @@ dependencies = [ "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "mio" +version = "0.6.10" +source = "git+https://github.com/carllerche/mio#987efbbaf3276692c2c564912ef1402d19df4066" +dependencies = [ + "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "mio" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +replace = "mio 0.6.10 (git+https://github.com/carllerche/mio)" + +[[package]] +name = "miow" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "native-tls" version = "0.1.4" @@ -505,10 +571,22 @@ dependencies = [ "openssl 0.9.16 (registry+https://github.com/rust-lang/crates.io-index)", "schannel 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", "tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "net2" +version = "0.2.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "nodrop" version = "0.1.9" @@ -517,6 +595,11 @@ dependencies = [ "odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "num-traits" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "num_cpus" version = "1.6.2" @@ -599,27 +682,6 @@ dependencies = [ "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rayon" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rayon-core 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rayon-core" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "redox_syscall" version = "0.1.30" @@ -669,20 +731,29 @@ dependencies = [ ] [[package]] -name = "ring" -version = "0.11.0" +name = "reqwest" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libflate 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "rustc-demangle" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -691,16 +762,11 @@ version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "rustls" -version = "0.9.0" +name = "rustc_version" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -708,7 +774,7 @@ name = "rustup" version = "1.5.0" dependencies = [ "clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)", - "download 0.3.0", + "download 0.4.0", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -790,7 +856,7 @@ name = "rustup-utils" version = "1.5.0" dependencies = [ "advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "download 0.3.0", + "download 0.4.0", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -838,6 +904,11 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "scoped-tls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "scopeguard" version = "0.3.2" @@ -860,18 +931,23 @@ dependencies = [ "core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", - "security-framework-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "security-framework-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "security-framework-sys" -version = "0.1.15" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "semver" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "semver" version = "0.7.0" @@ -885,6 +961,33 @@ name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "serde" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "serde_json" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "serde_urlencoded" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "sha2" version = "0.6.0" @@ -906,6 +1009,16 @@ dependencies = [ "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "slab" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "smallvec" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "socket2" version = "0.2.2" @@ -919,17 +1032,13 @@ dependencies = [ ] [[package]] -name = "solicit" -version = "0.4.4" +name = "strsim" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "strsim" -version = "0.6.0" +name = "take" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1027,22 +1136,73 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.1.30" +name = "tokio-core" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", + "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "traitobject" -version = "0.0.1" +name = "tokio-io" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "typeable" -version = "0.1.2" +name = "tokio-proto" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-service" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tls" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "toml" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "typenum" @@ -1051,10 +1211,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicase" -version = "1.4.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1088,11 +1248,6 @@ dependencies = [ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "untrusted" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "url" version = "1.5.1" @@ -1141,11 +1296,6 @@ name = "vec_map" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "version_check" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "void" version = "1.0.2" @@ -1169,16 +1319,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "webpki" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "winapi" version = "0.2.8" @@ -1227,6 +1367,7 @@ dependencies = [ ] [metadata] +"checksum adler32 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce93f29e3642662cac79d45e9c27ead906b91ac9921c1cf6f4801d01b4e19a8b" "checksum advapi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e06588080cb19d0acb6739808aafa5f26bfb2ca015b2b6370028b44cf7cb8a9a" "checksum aho-corasick 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ca972c2ea5f742bfce5687b9aef75506a764f61d37f8f649047846a9686ddb66" "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" @@ -1240,11 +1381,10 @@ dependencies = [ "checksum block-buffer 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1339a1042f5d9f295737ad4d9a6ab6bf81c84a933dba110b9200cd6d1448b814" "checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" +"checksum bytes 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d828f97b58cc5de3e40c421d0cf2132d6b2da4ee0e11b8632fa838f0f9333ad6" "checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" "checksum clap 2.26.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2267a8fdd4dce6956ba6649e130f62fb279026e5e84b92aa939ac8f85ce3f9f0" -"checksum coco 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c06169f5beb7e31c7c67ebf5540b8b472d23e3eade3b2ec7d1f5b504a85f91bd" "checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" -"checksum cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0e3d6405328b6edb412158b3b7710e2634e23f3614b9bb1c412df7952489a626" "checksum core-foundation 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25bfd746d203017f7d5cbd31ee5d8e17f94b6521c7af77ece6c9e4b2d4b16c67" "checksum core-foundation-sys 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "065a5d7ffdcbc8fa145d6f0746f3555025b9097a9e9cda59f7467abae670c78d" "checksum crypt32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e34988f7e069e0b2f3bfc064295161e489b2d4e04a2e4248fb94360cdf00b4ec" @@ -1253,6 +1393,7 @@ dependencies = [ "checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" "checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" "checksum digest 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e5b29bf156f3f4b3c4f610a25ff69370616ae6e0657d416de22645483e72af0a" +"checksum dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "80c8b71fd71146990a9742fc06dcbbde19161a267e0ad4e572c35162f4578c90" "checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a" "checksum env_proxy 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f190d9208c08f9f0f608d9ba2530620b351d10e4bf2a62ac2292fe63380fbfb7" "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" @@ -1261,18 +1402,23 @@ dependencies = [ "checksum flate2 0.2.19 (registry+https://github.com/rust-lang/crates.io-index)" = "36df0166e856739905cd3d7e0b210fe818592211a008862599845e012d8d304c" "checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" "checksum futures 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "4b63a4792d4f8f686defe3b39b92127fea6344de5d38202b2ee5a11bbbf29d6a" +"checksum futures-cpupool 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a283c84501e92cade5ea673a2a7ca44f71f209ccdd302a3e0896f50083d2c5ff" "checksum gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)" = "120d07f202dcc3f72859422563522b66fe6463a4c513df062874daad05f85f0a" "checksum generic-array 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6181b378c58e5aacf4d3e17836737465cb2857750b53f6b46672a3509f2a8d9d" -"checksum hpack 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3d2da7d3a34cf6406d9d700111b8eafafe9a251de41ae71d8052748259343b58" "checksum httparse 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "af2f2dd97457e8fb1ae7c5a420db346af389926e36f43768b96f101546b04a07" -"checksum hyper 0.9.18 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9bf64f730d6ee4b0528a5f0a316363da9d8104318731509d4ccc86248f82b3" +"checksum hyper 0.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "641abc3e3fcf0de41165595f801376e01106bca1fd876dda937730e477ca004c" +"checksum hyper-tls 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c81fa95203e2a6087242c38691a0210f23e9f3f8f944350bd676522132e2985" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" +"checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be" "checksum itertools 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e58359414720377f59889192f1ec0e726049ce5735bc21fdb0c4c8ae638305bb" +"checksum itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eb2f404fbc66fd9aac13e998248505e7ecb2ad8e44ab6388684c5fb11c6c251c" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" "checksum ktmw32-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f9313a869ff779ae08dd990b75a92dc06aa16d771f41305f7286649cd39a0ee" "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" "checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" +"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" "checksum libc 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "8a014d9226c2cc402676fbe9ea2e15dd5222cd1dd57f576b5b283178c944a264" +"checksum libflate 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "bb9e5c68bd981985afa70d22a81f339bb0ea8a071760e99894d6d393417e4a29" "checksum libz-sys 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd64ef8ee652185674455c1d450b83cbc8ad895625d543b5324d923f82e4d8" "checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" "checksum lzma-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "66b2e318eb97ab84f05725471f90c52a09c964053a5899a13fd0165acc26d00b" @@ -1282,10 +1428,15 @@ dependencies = [ "checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" "checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" -"checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" +"checksum mime 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "153f98dde2b135dece079e5478ee400ae1bab13afa52d66590eacfc40e912435" "checksum miniz-sys 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "28eaee17666671fa872e567547e8428e83308ebe5808cdf6a0e28397dbe2c726" +"checksum mio 0.6.10 (git+https://github.com/carllerche/mio)" = "" +"checksum mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd91d3bfbceb13897065e97b2ef177a09a438cb33612b2d371bf568819a9313" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum native-tls 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04b781c9134a954c84f0594b9ab3f5606abc516030388e8511887ef4c204a1e5" +"checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" "checksum nodrop 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "52cd74cd09beba596430cc6e3091b74007169a56246e1262f0ba451ea95117b2" +"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" "checksum num_cpus 1.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aec53c34f2d0247c5ca5d32cca1478762f301740468ee9ee6dcb7a0dd7a0c584" "checksum odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "c3df9b730298cea3a1c3faa90b7e2f9df3a9c400d0936d6015e6165734eefcba" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" @@ -1297,32 +1448,37 @@ dependencies = [ "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" "checksum psapi-sys 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "abcd5d1a07d360e29727f757a9decb3ce8bc6e0efa8969cfaad669a8317a2478" "checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" -"checksum rayon 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a77c51c07654ddd93f6cb543c7a849863b03abc7e82591afda6dc8ad4ac3ac4a" -"checksum rayon-core 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7febc28567082c345f10cddc3612c6ea020fc3297a1977d472cf9fdb73e6e493" "checksum redox_syscall 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "8312fba776a49cf390b7b62f3135f9b294d8617f7a7592cfd0ac2492b658cd7b" "checksum regex 0.1.80 (registry+https://github.com/rust-lang/crates.io-index)" = "4fd4ace6a8cf7860714a2c2280d6c1f7e6a413486c13298bbc86fd3da019402f" "checksum regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1731164734096285ec2a5ec7fea5248ae2f5485b3feeb0115af4fda2183b2d1b" "checksum regex-syntax 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "f9ec002c35e86791825ed294b50008eea9ddfc8def4420124fbc6b08db834957" "checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" "checksum remove_dir_all 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0882bc41b0ba6131c7f0ce97233b62d8099e3f3abc60d4938185d3e35439c0cc" -"checksum ring 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2a6dc7fc06a05e6de183c5b97058582e9da2de0c136eafe49609769c507724" -"checksum rustc-demangle 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3058a43ada2c2d0b92b3ae38007a2d0fa5e9db971be260e0171408a4ff471c95" +"checksum reqwest 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "22118c1f3a15ff3e6af4feb702594890e643853bf9c6ea398c19cd5fd8623fcf" +"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustls 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17727f4b991294da2c84d75a43c003151ff58072212768800f66c56ee46dca43" +"checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum same-file 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d931a44fdaa43b8637009e7632a02adc4f2b2e0733c08caa4cf00e8da4a117a7" "checksum schannel 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "14a5f8491ae5fc8c51aded1f5806282a0218b4d69b1b76913a0559507e559b90" +"checksum scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f417c22df063e9450888a7561788e9bd46d3bb3c1466435b4eccb903807f147d" "checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918" "checksum secur32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f412dfa83308d893101dd59c10d6fda8283465976c28c287c5c855bf8d216bc" "checksum security-framework 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "42ddf098d78d0b64564b23ee6345d07573e7d10e52ad86875d89ddf5f8378a02" -"checksum security-framework-sys 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f15de3b59a3dc60c6ef2ce3d3ed098e5db03b55946f290e8434e2a491c3d12" +"checksum security-framework-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "5bacdada57ea62022500c457c8571c17dfb5e6240b7c8eac5916ffa8c7138a55" +"checksum semver 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "d4f410fedcf71af0345d7607d246e7ad15faaadd49d240ee3b24e5dc21a820ac" "checksum semver 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fdd61b85a0fa777f7fb7c454b9189b2941b110d1385ce84d7f76efdf1606a85" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +"checksum serde 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f7726f29ddf9731b17ff113c461e362c381d9d69433f79de4f3dd572488823e9" +"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b" +"checksum serde_urlencoded 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ce0fd303af908732989354c6f02e05e2e6d597152870f2c6990efb0577137480" "checksum sha2 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d963c78ce367df26d7ea8b8cc655c651b42e8a1e584e869c1e17dae3ccb116a" "checksum shell32-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72f20b8f3c060374edb8046591ba28f62448c369ccbdc7b02075103fb3a9e38d" +"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" +"checksum smallvec 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4c8cbcd6df1e117c2210e13ab5109635ad68a929fcbb8964dc965b76cb5ee013" "checksum socket2 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4daf80fcf54186fac4fe049e0b39d36a5cfde69a11a06413e61e77f553cccf9a" -"checksum solicit 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "172382bac9424588d7840732b250faeeef88942e37b6e35317dce98cafdd75b2" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" +"checksum take 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b157868d8ac1f56b64604539990685fa7611d8fa9e5476cf0c02cf34d32917c5" "checksum tar 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "281285b717926caa919ad905ef89c63d75805c7d89437fb873100925a53f2b1b" "checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6" "checksum tempfile 2.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5b92290d7f1ce2d221405d5c78b9c568c9f1debb314aa92a513cd99db709f931" @@ -1333,17 +1489,19 @@ dependencies = [ "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" "checksum thread_local 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1697c4b57aeeb7a536b647165a2825faddffb1d3bad386d507709bd51a90bb14" "checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" +"checksum tokio-core 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e85d419699ec4b71bfe35bbc25bb8771e52eff0471a7f75c853ad06e200b4f86" +"checksum tokio-io 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c2c3ce9739f7387a0fa65b5421e81feae92e04d603f008898f4257790ce8c2db" +"checksum tokio-proto 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fbb47ae81353c63c487030659494b295f6cb6576242f907f203473b191b0389" +"checksum tokio-service 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24da22d077e0f15f55162bdbdc661228c1581892f52074fb242678d015b45162" +"checksum tokio-tls 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d88e411cac1c87e405e4090be004493c5d8072a370661033b1a64ea205ec2e13" "checksum toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796" -"checksum traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "07eaeb7689bb7fca7ce15628319635758eda769fed481ecfe6686ddef2600616" -"checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typenum 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a99dc6780ef33c78780b826cf9d2a78840b72cae9474de4bcaf9051e60ebbd" -"checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" +"checksum unicase 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e01da42520092d0cd2d6ac3ae69eb21a22ad43ff195676b86f8c37f487d6b80" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" "checksum unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8083c594e02b8ae1654ae26f0ade5158b119bd88ad0e8227a5d8fcd72407946" "checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" -"checksum untrusted 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6b65243989ef6aacd9c0d6bd2b822765c3361d8ed352185a6f3a41f3a718c673" "checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27" "checksum user32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4ef4711d107b21b410a3a974b1204d9accc8b10dad75d8324b5d755de1617d47" "checksum userenv-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "71d28ea36bbd9192d75bd9fa9b39f96ddb986eaee824adae5d53b6e51919b2f3" @@ -1351,11 +1509,9 @@ dependencies = [ "checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122" "checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" "checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" -"checksum version_check 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6b772017e347561807c1aa192438c5fd74242a670a6cffacc40f2defd1dc069d" "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum wait-timeout 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b9f3bf741a801531993db6478b95682117471f76916f5e690dd8d45395b09349" "checksum walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "bb08f9e670fab86099470b97cd2b252d6527f0b3cc1401acdb595ffc9dd288ff" -"checksum webpki 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e499345fc4c6b7c79a5b8756d4592c4305510a13512e79efafe00dfbd67bbac6" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" "checksum winreg 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf285379f20d7f26abd990d9a566be9d31ab7a9d335299baaa1f0604f5f96af" diff --git a/Cargo.toml b/Cargo.toml index 00eb13f34c..1f7e287822 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,10 @@ build = "build.rs" [features] -default = ["curl-backend", "hyper-backend"] +default = ["curl-backend", "reqwest-backend"] curl-backend = ["download/curl-backend"] -hyper-backend = ["download/hyper-backend"] -rustls-backend = ["download/rustls-backend"] +reqwest-backend = ["download/reqwest-backend"] # Include in the default set to disable self-update and uninstall. no-self-update = [] @@ -78,3 +77,6 @@ test = false # no unit tests name = "rustup-init" path = "src/rustup-cli/main.rs" test = false # no unit tests + +[replace] +"mio:0.6.10" = { git = "https://github.com/carllerche/mio", commit = "1d42d523f235bff298acd11f5758c3fed81ef67a" } diff --git a/src/ca-loader/Cargo.toml b/src/ca-loader/Cargo.toml deleted file mode 100644 index 7e82afb2f7..0000000000 --- a/src/ca-loader/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "ca-loader" -version = "0.1.0" -authors = [ "Ivan Nejgebauer " ] - -[dependencies] -libc = "0.2" - -[target."cfg(windows)".dependencies] -winapi = "0.2.8" -crypt32-sys = "0.2" - -[target.'cfg(target_os = "macos")'.dependencies] -security-framework = "0.1.5" diff --git a/src/ca-loader/src/lib.rs b/src/ca-loader/src/lib.rs deleted file mode 100644 index 5cbfb2c735..0000000000 --- a/src/ca-loader/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[macro_use] -mod macros; -mod sys; - -pub use self::sys::CertBundle; - -pub enum CertItem { - File(String), - Blob(Vec) -} diff --git a/src/ca-loader/src/macros.rs b/src/ca-loader/src/macros.rs deleted file mode 100644 index e7d26490d4..0000000000 --- a/src/ca-loader/src/macros.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Taken from the libc crate, see for -// authorship and copyright information. - -// A macro for defining #[cfg] if-else statements. -// -// This is similar to the `if/elif` C preprocessor macro by allowing definition -// of a cascade of `#[cfg]` cases, emitting the implementation which matches -// first. -// -// This allows you to conveniently provide a long list #[cfg]'d blocks of code -// without having to rewrite each clause multiple times. -macro_rules! cfg_if { - ($( - if #[cfg($($meta:meta),*)] { $($it:item)* } - ) else * else { - $($it2:item)* - }) => { - __cfg_if_items! { - () ; - $( ( ($($meta),*) ($($it)*) ), )* - ( () ($($it2)*) ), - } - } -} - -macro_rules! __cfg_if_items { - (($($not:meta,)*) ; ) => {}; - (($($not:meta,)*) ; ( ($($m:meta),*) ($($it:item)*) ), $($rest:tt)*) => { - __cfg_if_apply! { cfg(all(not(any($($not),*)), $($m,)*)), $($it)* } - __cfg_if_items! { ($($not,)* $($m,)*) ; $($rest)* } - } -} - -macro_rules! __cfg_if_apply { - ($m:meta, $($it:item)*) => { - $(#[$m] $it)* - } -} diff --git a/src/ca-loader/src/sys/macos.rs b/src/ca-loader/src/sys/macos.rs deleted file mode 100644 index dd20fbed96..0000000000 --- a/src/ca-loader/src/sys/macos.rs +++ /dev/null @@ -1,53 +0,0 @@ -extern crate security_framework as sf; - -use super::super::CertItem; -use self::sf::item::{ItemClass, ItemSearchOptions, Reference, SearchResult}; -use self::sf::keychain::SecKeychain; -use self::sf::os::macos::keychain::SecKeychainExt; -use std::i32; -use std::result::Result; - -pub struct CertBundle { - rv: Vec -} - -pub struct CertIter { - it: Box> -} - -impl IntoIterator for CertBundle { - type Item = CertItem; - type IntoIter = CertIter; - - fn into_iter(self) -> Self::IntoIter { - CertIter { it: Box::new(self.rv.into_iter()) } - } -} - -impl Iterator for CertIter { - type Item = CertItem; - - fn next(&mut self) -> Option { - if let Some(res) = self.it.next() { - if let Some(ref rref) = res.reference { - match rref { - &Reference::Certificate(ref cert) => return Some(CertItem::Blob(cert.to_der())), - _ => () - } - } - return self.next(); - } - None - } -} - -impl CertBundle { - pub fn new() -> Result { - let root_kc = try!(SecKeychain::open("/System/Library/Keychains/SystemRootCertificates.keychain").map_err(|_| ())); - let chains = [ root_kc ]; - let mut opts = ItemSearchOptions::new(); - let opts = opts.keychains(&chains).class(ItemClass::Certificate).load_refs(true).limit(i32::MAX as i64); - let rv = try!(opts.search().map_err(|_| ())); - Ok(CertBundle { rv: rv }) - } -} diff --git a/src/ca-loader/src/sys/mod.rs b/src/ca-loader/src/sys/mod.rs deleted file mode 100644 index 3a442a70a4..0000000000 --- a/src/ca-loader/src/sys/mod.rs +++ /dev/null @@ -1,14 +0,0 @@ -cfg_if! { - if #[cfg(windows)] { - mod windows; - pub use self::windows::CertBundle; - } else if #[cfg(target_os = "macos")] { - mod macos; - pub use self::macos::CertBundle; - } else if #[cfg(unix)] { - mod unix; - pub use self::unix::CertBundle; - } else { - // Unknown - } -} diff --git a/src/ca-loader/src/sys/unix.rs b/src/ca-loader/src/sys/unix.rs deleted file mode 100644 index 658264e6aa..0000000000 --- a/src/ca-loader/src/sys/unix.rs +++ /dev/null @@ -1,140 +0,0 @@ -extern crate libc; - -use std::ffi::CStr; -use std::fs; -use std::mem; -use std::result::Result; -use super::super::CertItem; - -cfg_if! { - if #[cfg(any(target_os = "android", target_os = "solaris"))] { - use std::fs::{read_dir, ReadDir}; - - pub struct CertBundle(&'static str); - - pub struct CertIter(&'static str, Option); - - impl IntoIterator for CertBundle { - type Item = CertItem; - type IntoIter = CertIter; - - fn into_iter(self) -> Self::IntoIter { - if let Ok(dir) = read_dir(self.0) { - CertIter(self.0, Some(dir)) - } else { - CertIter(self.0, None) - } - } - } - - impl Iterator for CertIter { - type Item = CertItem; - - fn next(&mut self) -> Option { - match self.1 { - None => return None, - Some(ref mut dir) => { - match dir.next() { - None => return None, - Some(Err(_)) => return None, - Some(Ok(ref de)) => { - if let Ok(ftyp) = de.file_type() { - if !ftyp.is_dir() { - if let Some(s) = de.file_name().to_str() { - let mut full_name = String::from(self.0); - full_name.push('/'); - full_name.push_str(s); - return Some(CertItem::File(full_name)); - } - } - } - } - } - } - } - self.next() - } - } - - impl CertBundle { - pub fn new() -> Result { - Ok(CertBundle(try!(sys_path()))) - } - } - } else { - use std::option; - - pub struct CertBundle(Option); - - impl IntoIterator for CertBundle { - type Item = CertItem; - type IntoIter = option::IntoIter; - - fn into_iter(self) -> Self::IntoIter { - self.0.into_iter() - } - } - - impl CertBundle { - pub fn new() -> Result { - Ok(CertBundle(Some(CertItem::File(try!(sys_path()).to_string())))) - } - } - } -} - -pub fn sys_path() -> Result<&'static str, ()> { - // Why use mem::uninitialized()? If we didn't, we'd need a bunch of - // #cfg's for OS variants, since the components of struct utsname are - // fixed-size char arrays (so no generic initializers), and that size - // is different across OSs. Furthermore, uname() doesn't care about - // the contents of struct utsname on input, and will fill it with - // properly NUL-terminated strings on successful return. - unsafe { - let mut uts = mem::uninitialized::(); - - if libc::uname(&mut uts) < 0 { - return Err(()); - } - let sysname = try!(CStr::from_ptr(uts.sysname.as_ptr()).to_str().map_err(|_| ())); - let release = try!(CStr::from_ptr(uts.release.as_ptr()).to_str().map_err(|_| ())); - let path = match sysname { - "FreeBSD" | "OpenBSD" => "/etc/ssl/cert.pem", - "NetBSD" => "/etc/ssl/certs", - "Linux" => linux_distro_guess_ca_path(), - "SunOS" => { - let major = release.split('.').take(1).collect::(); - let major = major.parse::().unwrap_or(5); - let minor = release.split('.').skip(1).take(1).collect::(); - let minor = minor.parse::().unwrap_or(10); - if major < 5 || (major == 5 && minor < 11) { - "/opt/csw/share/cacertificates/mozilla" - } else { - "/etc/certs/CA" - } - } - _ => unimplemented!() - }; - Ok(path) - } -} - -cfg_if! { - if #[cfg(target_os = "android")] { - fn linux_distro_guess_ca_path() -> &'static str { - "/system/etc/security/cacerts" - } - } else { - fn linux_distro_guess_ca_path() -> &'static str { - if let Ok(_debian) = fs::metadata("/etc/debian_version") { - "/etc/ssl/certs/ca-certificates.crt" - } else if let Ok(_rh) = fs::metadata("/etc/redhat-release") { - "/etc/pki/tls/certs/ca-bundle.crt" - } else if let Ok(_suse) = fs::metadata("/etc/SuSE-release") { - "/etc/ssl/ca-bundle.pem" - } else { // fallback - "/etc/pki/tls/cacert.pem" - } - } - } -} diff --git a/src/ca-loader/src/sys/windows.rs b/src/ca-loader/src/sys/windows.rs deleted file mode 100644 index 0adb5b005a..0000000000 --- a/src/ca-loader/src/sys/windows.rs +++ /dev/null @@ -1,79 +0,0 @@ -extern crate crypt32; -extern crate winapi; - -use super::super::CertItem; -use std::ffi::CString; -use std::ptr; -use std::result::Result; -use std::slice::from_raw_parts; - -pub struct CertBundle { - store: winapi::HCERTSTORE, - ctx_p: winapi::PCCERT_CONTEXT -} - -pub struct CertIter { - bundle: CertBundle -} - -impl IntoIterator for CertBundle { - type Item = CertItem; - type IntoIter = CertIter; - - fn into_iter(self) -> Self::IntoIter { - CertIter { bundle: self } - } -} - -impl Iterator for CertIter { - type Item = CertItem; - - fn next(&mut self) -> Option { - if self.bundle.ctx_p.is_null() { - return None; - } - unsafe { - let ctx = *self.bundle.ctx_p; - let enc_slice = from_raw_parts( - ctx.pbCertEncoded as *const u8, - ctx.cbCertEncoded as usize); - let mut blob = Vec::with_capacity(ctx.cbCertEncoded as usize); - blob.extend_from_slice(enc_slice); - self.bundle.ctx_p = crypt32::CertEnumCertificatesInStore( - self.bundle.store, - self.bundle.ctx_p); - Some(CertItem::Blob(blob)) - } - } -} - -impl CertBundle { - pub fn new() -> Result { - unsafe { - let store = crypt32::CertOpenSystemStoreA( - 0, - CString::new("Root").unwrap().as_ptr() as winapi::LPCSTR); - if store.is_null() { - return Err(()); - } - let ctx_p = crypt32::CertEnumCertificatesInStore( - store, - ptr::null()); - Ok(CertBundle { - store: store, - ctx_p: ctx_p - }) - } - } -} - -impl Drop for CertBundle { - fn drop(&mut self) { - unsafe { - if !self.ctx_p.is_null() { - crypt32::CertFreeCertificateContext(self.ctx_p); - } - crypt32::CertCloseStore(self.store, 0); - } - } -} diff --git a/src/download/Cargo.toml b/src/download/Cargo.toml index 98c3dcb5ee..16cf582dc2 100644 --- a/src/download/Cargo.toml +++ b/src/download/Cargo.toml @@ -1,46 +1,24 @@ [package] name = "download" -version = "0.3.0" +version = "0.4.0" authors = [ "Brian Anderson " ] license = "MIT/Apache-2.0" [features] -default = ["hyper-backend"] +default = ["curl-backend"] curl-backend = ["curl"] -hyper-backend = ["hyper", "env_proxy", "native-tls", "openssl-probe"] -rustls-backend = ["hyper", "env_proxy", "rustls", "lazy_static", "ca-loader"] +reqwest-backend = ["reqwest", "env_proxy"] [dependencies] error-chain = "0.10" -url = "1.1" +url = "1.2" curl = { version = "0.4.6", optional = true } -lazy_static = { version = "0.2", optional = true } -native-tls = { version = "0.1", optional = true } +env_proxy = { version = "0.1.1", optional = true } +reqwest = { version = "0.7.2", optional = true } [dev-dependencies] tempdir = "0.3.4" - -[dependencies.hyper] -version = "0.9.8" -default-features = false -optional = true - -[dependencies.env_proxy] -version = "0.1.1" -optional = true - -[target.'cfg(not(any(target_os = "windows", target_os = "macos")))'.dependencies] -openssl-probe = { version = "0.1", optional = true } - -[dependencies.rustls] -version = "0.9" -optional = true - -[dependencies.ca-loader] -path = "../ca-loader" -version = "0.1.0" -optional = true diff --git a/src/download/src/errors.rs b/src/download/src/errors.rs index 6dfada40cb..54d9225321 100644 --- a/src/download/src/errors.rs +++ b/src/download/src/errors.rs @@ -5,6 +5,7 @@ error_chain! { foreign_links { Io(::std::io::Error); + Reqwest(::reqwest::Error) #[cfg(feature = "reqwest-backend")]; } errors { diff --git a/src/download/src/lib.rs b/src/download/src/lib.rs index 0543a64c96..0bae38529f 100644 --- a/src/download/src/lib.rs +++ b/src/download/src/lib.rs @@ -4,11 +4,8 @@ extern crate error_chain; extern crate url; -#[cfg(feature = "rustls-backend")] -#[macro_use] -extern crate lazy_static; -#[cfg(feature = "rustls-backend")] -extern crate ca_loader; +#[cfg(feature = "reqwest-backend")] +extern crate reqwest; use url::Url; use std::path::Path; @@ -17,7 +14,7 @@ mod errors; pub use errors::*; #[derive(Debug, Copy, Clone)] -pub enum Backend { Curl, Hyper, Rustls } +pub enum Backend { Curl, Reqwest } #[derive(Debug, Copy, Clone)] pub enum Event<'a> { @@ -29,21 +26,13 @@ pub enum Event<'a> { } fn download_with_backend(backend: Backend, - url: &Url, - resume_from: u64, - callback: &Fn(Event) -> Result<()>) - -> Result<()> { + url: &Url, + resume_from: u64, + callback: &Fn(Event) -> Result<()>) + -> Result<()> { match backend { Backend::Curl => curl::download(url, resume_from, callback), - Backend::Hyper => hyper::download(url, callback), - Backend::Rustls => rustls::download(url, callback), - } -} - -fn supports_partial_download(backend: &Backend) -> bool { - match backend { - &Backend::Curl => true, - _ => false + Backend::Reqwest => reqwest_be::download(url, resume_from, callback), } } @@ -60,7 +49,7 @@ pub fn download_to_path_with_backend( use std::io::{Read, Write, Seek, SeekFrom}; || -> Result<()> { - let (file, resume_from) = if resume_from_partial && supports_partial_download(&backend) { + let (file, resume_from) = if resume_from_partial { let possible_partial = OpenOptions::new() .read(true) .open(&path); @@ -243,385 +232,71 @@ pub mod curl { } } -/// Download via hyper; encrypt with the native (or OpenSSl) TLS -/// stack via native-tls -#[cfg(feature = "hyper-backend")] -pub mod hyper { - - extern crate hyper; - #[cfg(not(any(target_os = "windows", target_os = "macos")))] - extern crate openssl_probe; - extern crate native_tls; +#[cfg(feature = "reqwest-backend")] +pub mod reqwest_be { + extern crate env_proxy; - use super::Event; use std::io; - use std::time::Duration; - use url::Url; use errors::*; - use hyper_base; - use self::hyper::error::Result as HyperResult; - use self::hyper::net::{SslClient, NetworkStream}; - use std::io::Result as IoResult; - use std::io::{Read, Write}; - use std::net::{SocketAddr, Shutdown}; - use std::sync::{Arc, Mutex, MutexGuard}; - use std::fmt::Debug; - - pub fn download(url: &Url, - callback: &Fn(Event) -> Result<()>) - -> Result<()> { - hyper_base::download::(url, callback) - } - - struct NativeSslClient; - - impl hyper_base::NewSslClient for NativeSslClient { - fn new() -> Self { NativeSslClient } - fn maybe_init_certs() { maybe_init_certs() } - } - - impl SslClient for NativeSslClient { - type Stream = NativeSslStream; - - fn wrap_client(&self, stream: T, host: &str) -> HyperResult { - use self::native_tls::TlsConnector; - use self::hyper::error::Error as HyperError; - - let builder = try!(TlsConnector::builder() - .map_err(|e| HyperError::Ssl(Box::new(e)))); - let cx = try!(builder.build() - .map_err(|e| HyperError::Ssl(Box::new(e)))); - let ssl_stream = try!(cx.connect(host, stream) - .map_err(|e| HyperError::Ssl(Box::new(e)))); - - Ok(NativeSslStream(Arc::new(Mutex::new(ssl_stream)))) - } - } - - #[derive(Clone)] - struct NativeSslStream(Arc>>); - - #[derive(Debug)] - struct NativeSslPoisonError; - - impl ::std::error::Error for NativeSslPoisonError { - fn description(&self) -> &str { "mutex poisoned during TLS operation" } - } - - impl ::std::fmt::Display for NativeSslPoisonError { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> { - f.write_str(::std::error::Error::description(self)) - } - } - - impl NativeSslStream { - fn lock<'a>(&'a self) -> IoResult>> { - self.0.lock() - .map_err(|_| io::Error::new(io::ErrorKind::Other, NativeSslPoisonError)) - } - } - - impl NetworkStream for NativeSslStream - where T: NetworkStream - { - fn peer_addr(&mut self) -> IoResult { - self.lock() - .and_then(|mut t| t.get_mut().peer_addr()) - } - fn set_read_timeout(&self, dur: Option) -> IoResult<()> { - self.lock() - .and_then(|t| t.get_ref().set_read_timeout(dur)) - } - fn set_write_timeout(&self, dur: Option) -> IoResult<()> { - self.lock() - .and_then(|t| t.get_ref().set_write_timeout(dur)) - } - fn close(&mut self, how: Shutdown) -> IoResult<()> { - self.lock() - .and_then(|mut t| t.get_mut().close(how)) - } - } - - impl Read for NativeSslStream - where T: Read + Write - { - fn read(&mut self, buf: &mut [u8]) -> IoResult { - self.lock() - .and_then(|mut t| t.read(buf)) - } - } - - impl Write for NativeSslStream - where T: Read + Write - { - fn write(&mut self, buf: &[u8]) -> IoResult { - self.lock() - .and_then(|mut t| t.write(buf)) - } - fn flush(&mut self) -> IoResult<()> { - self.lock() - .and_then(|mut t| t.flush()) - } - } - - // Tell our statically-linked OpenSSL where to find root certs - // cc https://github.com/alexcrichton/git2-rs/blob/master/libgit2-sys/lib.rs#L1267 - #[cfg(not(any(target_os = "windows", target_os = "macos")))] - fn maybe_init_certs() { - use std::sync::{Once, ONCE_INIT}; - static INIT: Once = ONCE_INIT; - INIT.call_once(|| { - openssl_probe::init_ssl_cert_env_vars(); - }); - } - - #[cfg(any(target_os = "windows", target_os = "macos"))] - fn maybe_init_certs() { } -} - -/// Download via hyper; encrypt with rustls -#[cfg(feature = "rustls-backend")] -pub mod rustls { - - extern crate hyper; - extern crate rustls; - - use super::Event; - use std::io; - use std::time::Duration; use url::Url; - use errors::*; - use hyper_base; - use self::hyper::error::Result as HyperResult; - use self::hyper::net::{SslClient, NetworkStream}; - use self::rustls::Session; - use std::io::Result as IoResult; - use std::io::{Read, Write}; - use std::net::{SocketAddr, Shutdown}; - use std::sync::{Arc, Mutex, MutexGuard}; + use super::Event; + use reqwest::{header, Client, Proxy}; pub fn download(url: &Url, + resume_from: u64, callback: &Fn(Event) -> Result<()>) -> Result<()> { - hyper_base::download::(url, callback) - } - - struct NativeSslClient; - - impl hyper_base::NewSslClient for NativeSslClient { - fn new() -> Self { NativeSslClient } - fn maybe_init_certs() { } - } - - impl SslClient for NativeSslClient { - type Stream = NativeSslStream; - - fn wrap_client(&self, stream: T, host: &str) -> HyperResult { - let config = global_config(); - let tls_client = rustls::ClientSession::new(&config, host); - - Ok(NativeSslStream(Arc::new(Mutex::new((stream, tls_client))))) - } - } - - fn global_config() -> Arc { - use ca_loader::{CertBundle, CertItem}; - use std::fs::File; - use std::io::BufReader; - - lazy_static! { - static ref CONFIG: Arc = init(); - } - - fn init() -> Arc { - let mut config = rustls::ClientConfig::new(); - let bundle = CertBundle::new().expect("cannot initialize CA cert bundle"); - let mut added = 0; - let mut invalid = 0; - for cert in bundle { - let (c_added, c_invalid) = match cert { - CertItem::Blob(blob) => match config.root_store.add(&blob) { - Ok(_) => (1, 0), - Err(_) => (0, 1) - }, - CertItem::File(name) => { - if let Ok(cf) = File::open(name) { - let mut reader = BufReader::new(cf); - match config.root_store.add_pem_file(&mut reader) { - Ok(pair) => pair, - Err(_) => (0, 1) - } - } else { - (0, 1) - } - } - }; - added += c_added; - invalid += c_invalid; - } - if added == 0 { - panic!("no CA certs added, {} were invalid", invalid); - } - Arc::new(config) - } - - CONFIG.clone() - } - - #[derive(Clone)] - struct NativeSslStream(Arc>); - - #[derive(Debug)] - struct NativeSslPoisonError; - - impl ::std::error::Error for NativeSslPoisonError { - fn description(&self) -> &str { "mutex poisoned during TLS operation" } - } - - impl ::std::fmt::Display for NativeSslPoisonError { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::result::Result<(), ::std::fmt::Error> { - f.write_str(::std::error::Error::description(self)) - } - } - - impl NativeSslStream { - fn lock<'a>(&'a self) -> IoResult> { - self.0.lock() - .map_err(|_| io::Error::new(io::ErrorKind::Other, NativeSslPoisonError)) - } - } - - impl NetworkStream for NativeSslStream - where T: NetworkStream - { - fn peer_addr(&mut self) -> IoResult { - self.lock() - .and_then(|mut t| t.0.peer_addr()) - } - fn set_read_timeout(&self, dur: Option) -> IoResult<()> { - self.lock() - .and_then(|t| t.0.set_read_timeout(dur)) - } - fn set_write_timeout(&self, dur: Option) -> IoResult<()> { - self.lock() - .and_then(|t| t.0.set_write_timeout(dur)) - } - fn close(&mut self, how: Shutdown) -> IoResult<()> { - self.lock() - .and_then(|mut t| t.0.close(how)) - } - } - - impl Read for NativeSslStream - where T: Read + Write - { - fn read(&mut self, buf: &mut [u8]) -> IoResult { - self.lock() - .and_then(|mut t| { - let (ref mut stream, ref mut tls) = *t; - while tls.wants_read() { - match tls.read_tls(stream) { - Ok(_) => { - match tls.process_new_packets() { - Ok(_) => (), - Err(e) => return Err(io::Error::new(io::ErrorKind::Other, format!("{:?}", e))) - } - while tls.wants_write() { - try!(tls.write_tls(stream)); - } - }, - Err(e) => return Err(e), - } - } - - tls.read(buf) - }) - } - } - - impl Write for NativeSslStream - where T: Read + Write - { - fn write(&mut self, buf: &[u8]) -> IoResult { - self.lock() - .and_then(|mut t| { - let (ref mut stream, ref mut tls) = *t; - let res = tls.write(buf); - while tls.wants_write() { - try!(tls.write_tls(stream)); - } - res - }) - } - fn flush(&mut self) -> IoResult<()> { - self.lock() - .and_then(|mut t| { - t.0.flush() - }) - } - } - -} - -#[cfg(feature = "hyper")] -pub mod hyper_base { - - extern crate hyper; - extern crate env_proxy; - - use super::Event; - use std::io; - use url::Url; - use errors::*; - use self::hyper::net::{SslClient, HttpStream}; - - pub trait NewSslClient { - fn new() -> Self; - fn maybe_init_certs(); - } - - pub fn download(url: &Url, - callback: &Fn(Event) -> Result<()>) - -> Result<()> - where S: SslClient + NewSslClient + Send + Sync + 'static, - { - - // Short-circuit hyper for the "file:" URL scheme + // Short-circuit reqwest for the "file:" URL scheme if try!(download_from_file_url(url, callback)) { return Ok(()); } - use self::hyper::client::{Client, ProxyConfig}; - use self::hyper::header::ContentLength; - use self::hyper::net::{HttpsConnector}; - - S::maybe_init_certs(); + let maybe_proxy = env_proxy::for_url(url) + .map(|(addr, port)| { + String::from(format!("{}:{}", addr, port)) + }); - // The Hyper HTTP client - let maybe_proxy = env_proxy::for_url(url); let client = match url.scheme() { "https" => match maybe_proxy { - None => Client::with_connector(HttpsConnector::new(S::new())), - Some(host_port) => Client::with_proxy_config(ProxyConfig(host_port.0, host_port.1, S::new())) + None => Client::new()?, + Some(host_port) => { + Client::builder()? + .proxy(Proxy::https(&host_port)?) + .build()? + } }, "http" => match maybe_proxy { - None => Client::new(), - Some(host_port) => Client::with_http_proxy(host_port.0, host_port.1) + None => Client::new()?, + Some(host_port) => { + Client::builder()? + .proxy(Proxy::http(&host_port)?) + .build()? + } }, _ => return Err(format!("unsupported URL scheme: '{}'", url.scheme()).into()) }; - let mut res = try!(client.get(url.clone()).send() - .chain_err(|| "failed to make network request")); - if res.status != self::hyper::Ok { - return Err(ErrorKind::HttpStatus(res.status.to_u16() as u32).into()); + let mut res = if resume_from > 0 { + client + .get(url.clone())? + .header(header::Range::Bytes( + vec![header::ByteRangeSpec::AllFrom(resume_from)] + )) + .send() + } else { + client.get(url.clone())?.send() + }.chain_err(|| "failed to make network request")?; + + if !res.status().is_success() { + let code: u16 = res.status().into(); + return Err(ErrorKind::HttpStatus(code as u32).into()); } let buffer_size = 0x10000; let mut buffer = vec![0u8; buffer_size]; - if let Some(len) = res.headers.get::().cloned() { + if let Some(len) = res.headers().get::().cloned() { try!(callback(Event::DownloadContentLengthReceived(len.0))); } @@ -672,7 +347,6 @@ pub mod hyper_base { Ok(false) } } - } #[cfg(not(feature = "curl-backend"))] @@ -690,30 +364,17 @@ pub mod curl { } } -#[cfg(not(feature = "hyper-backend"))] -pub mod hyper { - - use errors::*; - use url::Url; - use super::Event; - - pub fn download(_url: &Url, - _callback: &Fn(Event) -> Result<()> ) - -> Result<()> { - Err(ErrorKind::BackendUnavailable("hyper").into()) - } -} - -#[cfg(not(feature = "rustls-backend"))] -pub mod rustls { +#[cfg(not(feature = "reqwest-backend"))] +pub mod reqwest_be { use errors::*; use url::Url; use super::Event; pub fn download(_url: &Url, + _resume_from: u64, _callback: &Fn(Event) -> Result<()> ) -> Result<()> { - Err(ErrorKind::BackendUnavailable("rustls").into()) + Err(ErrorKind::BackendUnavailable("reqwest").into()) } } diff --git a/src/rustup-utils/src/notifications.rs b/src/rustup-utils/src/notifications.rs index 8356ad81a6..3d2367b4fb 100644 --- a/src/rustup-utils/src/notifications.rs +++ b/src/rustup-utils/src/notifications.rs @@ -21,8 +21,7 @@ pub enum Notification<'a> { NoCanonicalPath(&'a Path), ResumingPartialDownload, UsingCurl, - UsingHyper, - UsingRustls, + UsingReqwest, } impl<'a> Notification<'a> { @@ -37,7 +36,7 @@ impl<'a> Notification<'a> { DownloadDataReceived(_) | DownloadFinished | ResumingPartialDownload | - UsingCurl | UsingHyper | UsingRustls => NotificationLevel::Verbose, + UsingCurl | UsingReqwest => NotificationLevel::Verbose, NoCanonicalPath(_) => NotificationLevel::Warn, } } @@ -62,8 +61,7 @@ impl<'a> Display for Notification<'a> { NoCanonicalPath(path) => write!(f, "could not canonicalize path: '{}'", path.display()), ResumingPartialDownload => write!(f, "resuming partial download"), UsingCurl => write!(f, "downloading with curl"), - UsingHyper => write!(f, "downloading with hyper + native_tls"), - UsingRustls => write!(f, "downloading with hyper + rustls"), + UsingReqwest => write!(f, "downloading with reqwest"), } } } diff --git a/src/rustup-utils/src/utils.rs b/src/rustup-utils/src/utils.rs index 589521304d..8f69b8b788 100644 --- a/src/rustup-utils/src/utils.rs +++ b/src/rustup-utils/src/utils.rs @@ -221,12 +221,13 @@ fn download_file_(url: &Url, }; // Download the file + + // Keep the hyper env var around for a bit + // FIXME: remove this let use_hyper_backend = env::var_os("RUSTUP_USE_HYPER").is_some(); - let use_rustls_backend = env::var_os("RUSTUP_USE_RUSTLS").is_some(); - let (backend, notification) = if use_hyper_backend { - (Backend::Hyper, Notification::UsingHyper) - } else if use_rustls_backend { - (Backend::Rustls, Notification::UsingRustls) + let use_reqwest_backend = env::var_os("RUSTUP_USE_REQWEST").is_some(); + let (backend, notification) = if use_hyper_backend || use_reqwest_backend { + (Backend::Reqwest, Notification::UsingReqwest) } else { (Backend::Curl, Notification::UsingCurl) };