-
-
Notifications
You must be signed in to change notification settings - Fork 173
Description
Is your feature request related to a problem? Please describe.
This:
async-stripe/async-stripe/Cargo.toml
Line 24 in 95b3e7b
| hyper-rustls = { version = "0.27", default-features = false, features = ["http1", "http2", "tls12", "logging", "ring"], optional = true } |
Leads to errors like this when using the more modern aws-lc-rs in other crates:
thread 'main' (28048) panicked at /home/chris/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustls-0.23.34/src/crypto/mod.rs:249:14:
Could not automatically determine the process-level CryptoProvider from Rustls crate features.
Call CryptoProvider::install_default() before this point to select a provider manually, or make sure exactly one of the 'aws-lc-rs' and 'ring' features is enabled.
See the documentation of the CryptoProvider type for more information.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Other crates offer the option to choose one or the other (tho everyone is eventually moving to aws-lc-rs it seems like), but not this setup. It's probably very easy to add such a feature flag, with with a default on aws-lc-rs for hyper-rustls, instead of ring
Describe the solution you'd like
Use aws-lc-rs by default, with an option to override with ring
Describe alternatives you've considered
The workaround for me was to clone hyper-rustls and then modify its cargo.toml to do nothing with the ring feature, and include that in my project instead of an official version.
Additional context
I imagine you can repro this by adding this crate to a test app and then also adding -- if not then something like it:
rustls = { version = "0.23.34", default-features = false, features = ["aws-lc-rs", "std"] }