-
Notifications
You must be signed in to change notification settings - Fork 296
Add feature to use reqwest with rustls/webpki_roots #2811
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?
Add feature to use reqwest with rustls/webpki_roots #2811
Conversation
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.
Pull Request Overview
This PR adds support for using reqwest with webpki_roots as an alternative to native system SSL certificates. The change introduces a new feature flag reqwest_rustls_webpki_roots
while maintaining backward compatibility by renaming the existing reqwest_rustls
feature to reqwest_rustls_native_roots
and creating an alias.
Key changes:
- Introduces
reqwest_rustls_webpki_roots
feature for embedding certificates in the binary - Renames
reqwest_rustls
toreqwest_rustls_native_roots
for clarity while maintaining backward compatibility - Updates all conditional compilation directives to include the new feature flags
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
sdk/typespec/typespec_client_core/src/http/clients/mod.rs | Updates conditional compilation directives to include new rustls feature variants |
sdk/typespec/typespec_client_core/README.md | Documents the new webpki_roots feature and clarifies native_roots feature |
sdk/typespec/typespec_client_core/Cargo.toml | Adds feature definitions for both rustls variants with backward compatibility alias |
sdk/identity/azure_identity/Cargo.toml | Updates feature mappings to use new rustls feature names |
sdk/core/azure_core/README.md | Documents the new webpki_roots feature alongside existing rustls feature |
sdk/core/azure_core/Cargo.toml | Adds feature pass-through definitions for both rustls variants |
Comments suppressed due to low confidence (1)
sdk/identity/azure_identity/Cargo.toml:42
- The feature name
reqwest_rustls_
has a trailing underscore which appears to be a typo. Based on the context and other files, this should likely bereqwest_rustls
to maintain the backward compatibility alias.
reqwest_rustls_ = ["reqwest_rustls_native_roots"]
Thank you for your contribution @everest-boehm! We will review the pull request and get back to you soon. |
@everest-boehm please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
2 similar comments
@everest-boehm please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
@everest-boehm please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Ah, yes. |
I'm checking to see if this is a blocking issue or not. It may take a few days to get a response, sorry about that. |
I created this repository to verify that this actually allows using the The cargo book is phrased a bit ambiguously here I think
as it is unclear whether "enable The second big change was that I had to I apologize for this PR being such a mess. I honestly thought this would be a rather simple mechanical change. |
No need to apologize - Rust can be a challenge to deal with. |
The
webpki_roots
crate is an alternative to the ssl certificates provided by the underlying operating system. The discovery process of the latter involves making use of the system'sopenssl
installation on linux which in many development scenarios just isn't present. Here,webpki_roots
offers a convenient way to bake certificates into the final binary.