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:
parent
139d75d1ba
commit
0c8a01d2cf
25 changed files with 86 additions and 127 deletions
35
tools/sdk/update-rustls
Executable file
35
tools/sdk/update-rustls
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2026 Element Creations Ltd.
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
# Please see LICENSE files in the repository root for full details.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
VERSION=${1:-}
|
||||
if [ -n "$VERSION" ]; then
|
||||
PACKAGE=rustls-platform-verifier-android==$VERSION
|
||||
else
|
||||
PACKAGE=rustls-platform-verifier-android
|
||||
fi
|
||||
|
||||
cargo install cargo-download
|
||||
mkdir -p tmp/rustls-platform-verifier-android
|
||||
cargo download $PACKAGE > tmp/rustls-platform-verifier-android/rustls-platform-verifier-android.gz
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
|
||||
cd tmp/rustls-platform-verifier-android
|
||||
|
||||
echo "Extracting rustls-platform-verifier-android.aar from \`rustls-platform-verifier-android.gz\`"
|
||||
|
||||
tar -xzvf rustls-platform-verifier-android.gz &> /dev/null
|
||||
DIR=$(find . -type d -name "rustls-platform-verifier-android-*")
|
||||
AAR=$(find $DIR -type f -name "*.aar")
|
||||
cp $AAR $ROOT/libraries/matrix/impl/libs/rustls-platform-verifier-android.aar
|
||||
cd $ROOT
|
||||
rm -r tmp/rustls-platform-verifier-android
|
||||
|
||||
echo "Updated rustls-platform-verifier-android.aar using \`$(basename $AAR)\`" > libraries/matrix/impl/libs/rustls-platform-verifier-android.aar.version
|
||||
cat libraries/matrix/impl/libs/rustls-platform-verifier-android.aar.version
|
||||
Loading…
Add table
Add a link
Reference in a new issue