Merge pull request #8488 from vector-im/feature/bca/bump_crypto_sdk_0.3.8
bump crypto sdk to 0.3.9
This commit is contained in:
commit
56ea316a22
|
@ -26,7 +26,7 @@ buildscript {
|
|||
classpath libs.gradle.hiltPlugin
|
||||
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
|
||||
classpath 'com.google.gms:google-services:4.3.15'
|
||||
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.2.0.3129'
|
||||
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.0.0.2929'
|
||||
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
|
||||
classpath "com.likethesalad.android:stem-plugin:2.4.1"
|
||||
classpath 'org.owasp:dependency-check-gradle:8.2.1'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Updated rust crypto SDK to version 0.3.9
|
|
@ -216,8 +216,8 @@ dependencies {
|
|||
|
||||
implementation libs.google.phonenumber
|
||||
|
||||
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.7")
|
||||
// rustCryptoApi project(":library:rustCrypto")
|
||||
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.9")
|
||||
// rustCryptoApi project(":library:rustCrypto")
|
||||
|
||||
testImplementation libs.tests.junit
|
||||
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
|
||||
|
|
|
@ -183,8 +183,9 @@ internal class RustCryptoService @Inject constructor(
|
|||
|
||||
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
|
||||
val version = org.matrix.rustcomponents.sdk.crypto.version()
|
||||
val gitHash = org.matrix.rustcomponents.sdk.crypto.versionInfo().gitSha
|
||||
val vodozemac = org.matrix.rustcomponents.sdk.crypto.vodozemacVersion()
|
||||
return if (longFormat) "Rust SDK $version, Vodozemac $vodozemac" else version
|
||||
return if (longFormat) "Rust SDK $version ($gitHash), Vodozemac $vodozemac" else version
|
||||
}
|
||||
|
||||
override suspend fun getMyCryptoDevice(): CryptoDeviceInfo = withContext(coroutineDispatchers.io) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_QR_
|
|||
import org.matrix.android.sdk.internal.crypto.model.rest.VERIFICATION_METHOD_RECIPROCATE
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
||||
import org.matrix.android.sdk.internal.session.SessionScope
|
||||
import org.matrix.rustcomponents.sdk.crypto.VerificationRequestState
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
|
@ -165,7 +166,7 @@ internal class RustVerificationService @Inject constructor(
|
|||
// If this is a SAS verification originating from a `m.key.verification.request`
|
||||
// event, we auto-accept here considering that we either initiated the request or
|
||||
// accepted the request. If it's a QR code verification, just dispatch an update.
|
||||
if (request.isReady() && transaction is SasVerification) {
|
||||
if (request.innerState() is VerificationRequestState.Ready && transaction is SasVerification) {
|
||||
// accept() will dispatch an update, no need to do it twice.
|
||||
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
||||
transaction.accept()
|
||||
|
@ -308,7 +309,7 @@ internal class RustVerificationService @Inject constructor(
|
|||
return if (request != null) {
|
||||
request.acceptWithMethods(methods)
|
||||
request.startQrCode()
|
||||
request.isReady()
|
||||
request.innerState() is VerificationRequestState.Ready
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
|
|
@ -136,9 +136,9 @@ internal class VerificationRequest @AssistedInject constructor(
|
|||
* concrete verification flow, i.e. we can show/scan a QR code or start emoji
|
||||
* verification.
|
||||
*/
|
||||
internal fun isReady(): Boolean {
|
||||
return innerVerificationRequest.isReady()
|
||||
}
|
||||
// internal fun isReady(): Boolean {
|
||||
// return innerVerificationRequest.isReady()
|
||||
// }
|
||||
|
||||
/** Did we advertise that we're able to scan QR codes */
|
||||
internal fun canScanQrCodes(): Boolean {
|
||||
|
|
Loading…
Reference in New Issue