feat(crypto): add support for crypto-native-tls feature and update reqwest dependencies#2537
Open
AaronRM wants to merge 2 commits intoopen-telemetry:mainfrom
Open
feat(crypto): add support for crypto-native-tls feature and update reqwest dependencies#2537AaronRM wants to merge 2 commits intoopen-telemetry:mainfrom
AaronRM wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
…qwest dependencies
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2537 +/- ##
==========================================
- Coverage 88.35% 88.32% -0.04%
==========================================
Files 613 613
Lines 221837 221840 +3
==========================================
- Hits 196005 195930 -75
- Misses 25308 25386 +78
Partials 524 524
🚀 New features to boost your workflow:
|
Contributor
Author
|
@lalitb and @pritishnahar95 have some context in this area and may have feedback |
jmacd
approved these changes
Apr 3, 2026
lalitb
reviewed
Apr 4, 2026
| not(feature = "crypto-aws-lc"), | ||
| not(feature = "crypto-openssl") | ||
| ))] | ||
| { |
Member
There was a problem hiding this comment.
This looks unsafe with experimental-tls: crypto-native-tls skips rustls provider installation here, but experimental-tls still uses rustls-based code paths that require a default provider. That means the build can succeed and then fail at runtime. Can we disallow that combination or still install a rustls provider in that case?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Summary
Add a new
crypto-native-tlsfeature flag that uses the platform's native TLS stack (SChannel on Windows, OpenSSL on Linux, Security.framework on macOS) instead of rustls. This follows the pluggable crypto architecture from PR #2269and avoids cross-compilation issues with C/asm crypto providers on Windows.
What issue does this PR close?
crypto-native-tlsfeature #2536How are these changes tested?
cargo test --no-default-features --features crypto-native-tls --workspacepasses (591 tests, same as default features)no_default_features_checkjobAre there any user-facing changes?
Yes: new
crypto-native-tlsfeature flag available for embedders who want platform-native TLS without compiling a crypto library from source. Default behavior is unchanged (crypto-ring). Note thatcrypto-native-tlscovers client-side HTTP/HTTPS connections only (reqwest); server-side gRPC TLS (experimental-tls) still requires a rustls-based crypto feature.