-
Notifications
You must be signed in to change notification settings - Fork 251
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
Easy to use webpki-roots #575
Comments
We are working on reducing the number of branching feature paths. We plan to accomplish this by unifying the HTTP connection providers and possibly providing them through a separate crate. Ultimately, we want to avoid the situation where people (including us) have to understand complex branching rules in order to understand the ways that HTTP/HTTPS client creation and configuration happens. |
I can definitely appreciate that. My primary goal with this was simplicity as well; I don't just want to reduce dependencies (which I care about as well), but also, omitting native certificate support entirely seems like the easiest way to be confident that no possible code path will attempt to read them. Nonetheless, I'd be happy with any solution path that makes that possible, including a refactor to do HTTP initialization in a different way. I'd just like to make sure that it's not substantially harder to run with webpki-roots than to run with native roots. Thank you for aws-sdk-rust! |
In either case, I think there's a bug here in aws-config where something isn't building a connector properly. Thanks for the reproducer, we'll track this down |
Checking back in on this: it still seems like there's no way to configure the built-in usage of hyper-rustls to use webpki-roots, and the only solution is overriding it completely and making sure the built-in version never gets invoked. I'd love to have a simpler and more robust solution than that. |
Changing this to feature request to make webpki-roots easier to use. |
Describe the bug
aws-sdk-rust includes an example of how to configure hyper-rustls to use webpki-roots and TLS 1.3, in
examples/tls/src/lib.rs
.However, this example has two separate versions of hyper-rustls involved (0.23.0 and 0.22.1), and while hyper-rustls 0.23.0 is configured to use webpki-roots, something in aws-sdk-rust is still attempting to initialize hyper-rustls 0.22.1, which is failing with this error:
thread 'main' panicked at 'no CA certificates found', /home/josh/.cargo/registry/src/suiyiyu.us.kg-1ecc6299db9ec823/hyper-rustls-0.22.1/src/connector.rs:45:13
(The easiest way to test this is to build a static binary using the
x86_64-unknown-linux-musl
target and run it in an otherwise empty chroot.)Expected Behavior
I'd like to use aws-sdk-rust with only webpki-roots, in a standalone static binary that has no system certificate store.
Current Behavior
thread 'main' panicked at 'no CA certificates found', /home/josh/.cargo/registry/src/suiyiyu.us.kg-1ecc6299db9ec823/hyper-rustls-0.22.1/src/connector.rs:45:13
Reproduction Steps
Here's a cut down version of the example (skipping the TLS 1.3 bits):
Cargo.toml
(
aws-config
needsrustls
enabled due to an unrelated bug. And the hyper-rustls dependency is coming in viaaws-smithy-client
: despitedefault-features = false
, there's an indirect dependency onaws-smithy-client
's default features viaaws-types
, among other things.)src/main.rs
Some debug prints suggest that the issue happens when trying to create
aws_sdk_config
. The example in "possible solution" gives a workaround.Possible Solution
Alternate example that does work:
src/main.rs
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
Debian, latest sid
Logs
No response
The text was updated successfully, but these errors were encountered: