Skip to content

Commit

Permalink
Re-add rustls support and enable it by default
Browse files Browse the repository at this point in the history
rustls is seen as mature enough for curl to depend on it optionally,
and it recently has had an audit.

This commit adds back rustls support removed by 86bb185
and enables it by default.
  • Loading branch information
est31 committed Oct 9, 2020
1 parent 243b453 commit 40e951b
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 4 deletions.
95 changes: 95 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ version = "1.22.1"

[features]
curl-backend = ["download/curl-backend"]
default = ["curl-backend", "reqwest-backend"]
default = ["curl-backend", "reqwest-backend", "reqwest-rustls-tls"]

reqwest-backend = ["download/reqwest-backend"]
vendored-openssl = ['openssl/vendored']

reqwest-default-tls = ["download/reqwest-default-tls"]
reqwest-rustls-tls = ["download/reqwest-rustls-tls"]

# Include in the default set to disable self-update and uninstall.
no-self-update = []

Expand All @@ -25,7 +30,7 @@ anyhow = "1.0.31"
cfg-if = "0.1"
chrono = "0.4"
clap = "2"
download = {path = "download"}
download = { path = "download", default-features = false }
error-chain = "0.12"
flate2 = "1"
git-testament = "0.1.4"
Expand Down
6 changes: 4 additions & 2 deletions download/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ license = "MIT/Apache-2.0"

[features]

default = ["reqwest-backend"]
default = ["reqwest-backend", "reqwest-rustls-tls"]

curl-backend = ["curl"]
reqwest-backend = ["reqwest", "env_proxy", "lazy_static"]
reqwest-default-tls = ["reqwest/default-tls"]
reqwest-rustls-tls = ["reqwest/rustls-tls"]

[dependencies]
error-chain = "0.12"
url = "2.1"
curl = { version = "0.4.11", optional = true }
env_proxy = { version = "0.4.1", optional = true }
lazy_static = { version = "1.0", optional = true }
reqwest = { version = "0.10", features = ["blocking", "gzip", "socks"], optional = true }
reqwest = { version = "0.10", default-features = false, features = ["blocking", "gzip", "socks"], optional = true }

[dev-dependencies]
hyper = { version = "0.13", default-features = false, features = ["tcp"] }
Expand Down

0 comments on commit 40e951b

Please sign in to comment.