Skip to content

Commit ee7dab8

Browse files
authored
Merge pull request #572 from brson/rustls
Add preliminary rustls support
2 parents 8984d8d + ff66ed4 commit ee7dab8

File tree

6 files changed

+505
-155
lines changed

6 files changed

+505
-155
lines changed

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,18 @@ license = "MIT OR Apache-2.0"
1717

1818
build = "build.rs"
1919

20+
[features]
21+
22+
default = ["curl-backend", "hyper-backend"]
23+
24+
curl-backend = ["download/curl-backend"]
25+
hyper-backend = ["download/hyper-backend"]
26+
rustls-backend = ["download/rustls-backend"]
27+
2028
[dependencies]
2129
rustup-dist = { path = "src/rustup-dist", version = "0.2.0" }
2230
rustup-utils = { path = "src/rustup-utils", version = "0.2.0" }
31+
download = { path = "src/download" }
2332
error-chain = "0.2.1"
2433
clap = "2.2.4"
2534
regex = "0.1.41"

src/download/Cargo.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@ license = "MIT/Apache-2.0"
88

99
[features]
1010

11-
default = ["hyper-mode", "curl-mode"]
11+
default = ["hyper-backend"]
1212

13-
curl-mode = ["curl"]
14-
hyper-mode = ["hyper", "native-tls", "openssl-sys"]
13+
curl-backend = ["curl"]
14+
hyper-backend = ["hyper", "native-tls", "openssl-sys"]
15+
rustls-backend = ["hyper", "rustls", "lazy_static"]
1516

1617
[dependencies]
1718
error-chain = "0.2.1"
1819
url = "1.1"
19-
20-
[dependencies.curl]
21-
version = "0.3"
22-
optional = true
20+
curl = { version = "0.3", optional = true }
21+
lazy_static = { version = "0.2", optional = true }
2322

2423
[dependencies.hyper]
2524
version = "0.9.8"
@@ -33,3 +32,6 @@ optional = true
3332
[target.'cfg(not(any(target_os = "windows", target_os = "macos")))'.dependencies]
3433
openssl-sys = { version = "0.7.11", optional = true }
3534

35+
[dependencies.rustls]
36+
git = "https://github.com/ctz/rustls.git"
37+
optional = true

0 commit comments

Comments
 (0)