fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.19 (#6411)

* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.18

* Fix API breaks

* Add compatibility with rustls (#6367)

A new `rustls-platform-verifier-android` library has to be added to the project, it'll be called from Rust to get access to the certificates on Android.

Originally, this was supposed to be added as a local maven repo pointing to the rust crate that publishes the AAR, but that's just plain terrible (more details [here](https://github.com/rustls/rustls-platform-verifier#android).

Instead, what we can do is use a script that uses `cargo-download` to download the latest crate or a specified version, unzip it and add the `aar` file to the `:libraries:matrix:impl` module.

* Try fixing Sonar with local AAR files

* Remove `UserCertificatesProvider`: this is no longer needed after integrating rustls

* Added some docs for rustls and its `platform-verifier` library

* Upgrade SDK to `26.03.19`: this version contains a workaround that allows the app to use the same TLS verifier as before, fixing the Let's Encrypt issues we saw with some homeservers (like element.io)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot] 2026-03-20 16:20:37 +01:00 committed by GitHub
parent 139d75d1ba
commit 0c8a01d2cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 86 additions and 127 deletions

View file

@ -11,6 +11,7 @@
* [Rust SDK](#rust-sdk)
* [Matrix Rust Component Kotlin](#matrix-rust-component-kotlin)
* [Building the SDK locally](#building-the-sdk-locally)
* [rustls and platform verifier](#rustls-and-platform-verifier)
* [The Android project](#the-android-project)
* [Application](#application)
* [Jetpack Compose](#jetpack-compose)
@ -160,6 +161,19 @@ Troubleshooting:
You can switch back to using the published version of the SDK by deleting `libraries/rustsdk/matrix-rust-sdk.aar`.
#### rustls and platform verifier
The SDK uses [rustls](https://github.com/rustls/rustls) for TLS, which is a pure Rust implementation of TLS. In turn, this means we have to add the
`rustls-platform-verifier` library to our project, which provides platform-specific TLS certificate verification for rustls. This library uses the Android NDK's
`TrustManager` to verify TLS certificates on Android.
Though it's meant to be used through convoluted way of downloading the dependency, locating it in the
cargo folder and using that path as a local maven repo as described [here](https://github.com/rustls/rustls-platform-verifier#android), we have
added a script (`tools/sdk/update-rustls`) to download, unpack and add this AAR file locally to the `:libraries:matrix:impl` module instead.
When should we run this script? Whenever we update the `rustls` dependency in the Rust SDK, we should check if the version of `rustls-platform-verifier`
has changed as well, and if so, run this script to update the AAR file in our project. The SDK team should ping us when this happens.
### The Android project
The project should compile out of the box.