-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Mobile platform verifier fallback #410
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
Mobile platform verifier fallback #410
Conversation
6e69a7a to
8745e3c
Compare
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 refactors TLS certificate verification by introducing a unified verifier module that consolidates certificate verification logic across the codebase. The changes replace platform-specific rustls_platform_verifier usage with a custom fallback verifier that tries webpki verification first and falls back to platform verification on mobile platforms.
Key changes:
- Introduced a new
verifiermodule with aFallbackPlatformVerifierthat uses webpki roots with platform verifier as fallback - Simplified WebSocket connection logic by removing the select-based multi-future approach in favor of direct connection attempts
- Updated dependency configuration to make
rustls-platform-verifiermobile-only and addedrustls-native-certsandwebpki-rootsfor all non-macOS/Windows platforms
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/verifier.rs | New module implementing certificate verification with webpki primary verifier and platform fallback for Android/iOS |
| src/websocket.rs | Simplified WebSocket TLS connection logic to use unified verifier module, removing complex multi-future selection code |
| src/proxy.rs | Updated HTTPS proxy connection to use unified verifier module instead of direct platform verifier |
| src/lib.rs | Added verifier module declaration for non-macOS/Windows platforms and adjusted rustls_platform_verifier re-export |
| Cargo.toml | Reorganized dependencies to make rustls-platform-verifier mobile-only and added webpki-roots and rustls-native-certs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
efd695c to
92fe2c8
Compare
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
92fe2c8 to
4e9337b
Compare
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4e9337b to
b22d819
Compare
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: 21pages <[email protected]>
b22d819 to
bbc8e2f
Compare
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
related pr: seanmonstar/reqwest#2849