-
Notifications
You must be signed in to change notification settings - Fork 172
Pluggable Crypto / Update reqwest 0.13 #585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
6533616
2269013
7d2d4e8
1c226f0
5c873c1
55cc3ca
c57ea50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -54,8 +54,9 @@ hyper = { version = "1.2", default-features = false, optional = true } | |||||
| md-5 = { version = "0.10.6", default-features = false, optional = true } | ||||||
| quick-xml = { version = "0.38.0", features = ["serialize", "overlapped-lists"], optional = true } | ||||||
| rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"], optional = true } | ||||||
| reqwest = { version = "0.12", default-features = false, features = ["rustls-tls-native-roots", "http2"], optional = true } | ||||||
| reqwest = { version = "0.13", default-features = false, features = ["http2", "rustls-no-provider"], optional = true } | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Having
Suggested change
and letting users that want the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since features are supposed to be purely additive, enabling as a few features as necessary is the best approach for a library. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! Hence my suggestion to not add
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC this brings in aws-lc-rs which people may be wanting to avoid There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tustvold Indeed, it's what happens if the (please ignore this message if this discussion is not useful, thank you for your work on this crate) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The suggested change avoids enabling any TLS backend by default. |
||||||
| ring = { version = "0.17", default-features = false, features = ["std"], optional = true } | ||||||
| aws-lc-rs = { version = "1.15", default-features = false, optional = true } | ||||||
| rustls-pki-types = { version = "1.9", default-features = false, features = ["std"], optional = true } | ||||||
| serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } | ||||||
| serde_json = { version = "1.0", default-features = false, features = ["std"], optional = true } | ||||||
|
|
@@ -71,13 +72,26 @@ wasm-bindgen-futures = "0.4.18" | |||||
|
|
||||||
| [features] | ||||||
| default = ["fs"] | ||||||
| cloud = ["serde", "serde_json", "quick-xml", "hyper", "reqwest", "reqwest/stream", "chrono/serde", "base64", "rand", "ring", "http-body-util", "form_urlencoded", "serde_urlencoded"] | ||||||
| azure = ["cloud", "httparse"] | ||||||
| cloud-no-crypto = ["serde", "serde_json", "quick-xml", "hyper", "reqwest", "reqwest/stream", "chrono/serde", "base64", "rand","http-body-util", "form_urlencoded", "serde_urlencoded"] | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a massive fan of the feature explosion, but this was the only way to avoid needing to cut a breaking release. |
||||||
| cloud = ["aws-lc-rs", "cloud-no-crypto"] | ||||||
|
|
||||||
| aws-lc-rs = ["dep:aws-lc-rs", "reqwest/rustls", "rustls-pki-types"] | ||||||
| ring = ["dep:ring", "rustls-pki-types"] | ||||||
|
|
||||||
| azure-no-crypto = ["cloud-no-crypto", "httparse"] | ||||||
| azure = ["cloud", "azure-no-crypto"] | ||||||
|
|
||||||
| fs = ["walkdir"] | ||||||
| gcp = ["cloud", "rustls-pki-types"] | ||||||
| aws = ["cloud", "md-5"] | ||||||
| http = ["cloud"] | ||||||
| tls-webpki-roots = ["reqwest?/rustls-tls-webpki-roots"] | ||||||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Given this change is now spicy enough that I don't think it should go in a non-breaking release, I opted to take the opportunity to remove this feature flag. People can register the certificates manually if they wish to. |
||||||
|
|
||||||
| gcp-no-crypto = ["cloud-no-crypto"] | ||||||
| gcp = ["cloud", "gcp-no-crypto"] | ||||||
|
|
||||||
| aws-no-crypto = ["cloud-no-crypto", "md-5"] | ||||||
| aws = ["cloud", "aws-no-crypto"] | ||||||
|
|
||||||
| http-no-crypto = ["cloud-no-crypto"] | ||||||
| http = ["cloud", "http-no-crypto"] | ||||||
|
|
||||||
| integration = ["rand"] | ||||||
|
|
||||||
| [dev-dependencies] # In alphabetical order | ||||||
|
|
@@ -86,8 +100,9 @@ hyper-util = "0.1" | |||||
| rand = "0.9" | ||||||
| tempfile = "3.1.0" | ||||||
| regex = "1.11.1" | ||||||
| webpki-root-certs = "1" | ||||||
| # The "gzip" feature for reqwest is enabled for an integration test. | ||||||
| reqwest = { version = "0.12", default-features = false, features = ["gzip"] } | ||||||
| reqwest = { version = "0.13", default-features = false, features = ["gzip"] } | ||||||
|
|
||||||
| [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies] | ||||||
| wasm-bindgen-test = "0.3.50" | ||||||
|
|
@@ -105,4 +120,4 @@ features = ["js"] | |||||
| [[test]] | ||||||
| name = "get_range_file" | ||||||
| path = "tests/get_range_file.rs" | ||||||
| required-features = ["fs"] | ||||||
| required-features = ["fs"] | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that cargo-deny should be able to do that, but I DON'T think it can ban dependencies based on features:
https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html