Conversation
The ring patch switches matrix-sdk's reqwest to rustls-no-provider, which no longer installs a crypto provider. Nothing else installs one, so every HTTP request fails with "No provider set" (unomed-dev#61). Install ring as the process-wide default at the start of HttpSettings::make_client, before reqwest (and, on Android, the custom rustls ClientConfig) needs it. install_default only errors when a provider is already installed, so the result is ignored.
Author
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.
Fixes #61.
patches/matrix-rust-sdk-ring-provider.patchswitches matrix-sdk's reqwest torustls-no-provider, which stops reqwest from installing a crypto provider. Nothing else installs one, so since 0.10.1 every HTTP request fails with "No provider set" andrestoreSessioncan't complete.This adds one hunk to that patch:
HttpSettings::make_clientinstalls ring as the process-wide default before building the reqwest client:rustls::ClientConfig::builder()inandroid_setup_webkpi_verifier, which also needs a default provider.install_defaultreturns an error only when a provider is already installed (for example if an app installs its own), so ignoring it is safe and keeps the call idempotent.rustlswith theringfeature is already a non-wasm dependency added by the same patch, so no Cargo changes are needed.The rest of the patch is unchanged; the regenerated file applies cleanly with
git apply --checkto matrix-rust-sdk at1c44fb66(matrix-sdk-0.18.0).Testing: I haven't built the bindings locally (no Rust toolchain on this machine), so this needs a CI or local build to confirm. For context, we hit both issues on Android (React Native 0.84, Android 16): 0.10.0 crashes in aws-lc's jitter entropy on the first TLS handshake, and 0.10.1 fails with "No provider set".