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 libs.gradle.hiltPlugin
|
||||||
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
|
classpath 'com.google.firebase:firebase-appdistribution-gradle:4.0.0'
|
||||||
classpath 'com.google.gms:google-services:4.3.15'
|
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.google.android.gms:oss-licenses-plugin:0.10.6'
|
||||||
classpath "com.likethesalad.android:stem-plugin:2.4.1"
|
classpath "com.likethesalad.android:stem-plugin:2.4.1"
|
||||||
classpath 'org.owasp:dependency-check-gradle:8.2.1'
|
classpath 'org.owasp:dependency-check-gradle:8.2.1'
|
||||||
|
1
changelog.d/8488.feature
Normal file
1
changelog.d/8488.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Updated rust crypto SDK to version 0.3.9
|
@ -216,8 +216,8 @@ dependencies {
|
|||||||
|
|
||||||
implementation libs.google.phonenumber
|
implementation libs.google.phonenumber
|
||||||
|
|
||||||
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.7")
|
rustCryptoImplementation("org.matrix.rustcomponents:crypto-android:0.3.9")
|
||||||
// rustCryptoApi project(":library:rustCrypto")
|
// rustCryptoApi project(":library:rustCrypto")
|
||||||
|
|
||||||
testImplementation libs.tests.junit
|
testImplementation libs.tests.junit
|
||||||
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
|
// 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 {
|
override fun getCryptoVersion(context: Context, longFormat: Boolean): String {
|
||||||
val version = org.matrix.rustcomponents.sdk.crypto.version()
|
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()
|
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) {
|
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.VERIFICATION_METHOD_RECIPROCATE
|
||||||
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
import org.matrix.android.sdk.internal.crypto.model.rest.toValue
|
||||||
import org.matrix.android.sdk.internal.session.SessionScope
|
import org.matrix.android.sdk.internal.session.SessionScope
|
||||||
|
import org.matrix.rustcomponents.sdk.crypto.VerificationRequestState
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import javax.inject.Inject
|
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`
|
// 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
|
// 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.
|
// 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.
|
// accept() will dispatch an update, no need to do it twice.
|
||||||
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
Timber.d("## Verification: Auto accepting SAS verification with $sender")
|
||||||
transaction.accept()
|
transaction.accept()
|
||||||
@ -308,7 +309,7 @@ internal class RustVerificationService @Inject constructor(
|
|||||||
return if (request != null) {
|
return if (request != null) {
|
||||||
request.acceptWithMethods(methods)
|
request.acceptWithMethods(methods)
|
||||||
request.startQrCode()
|
request.startQrCode()
|
||||||
request.isReady()
|
request.innerState() is VerificationRequestState.Ready
|
||||||
} else {
|
} else {
|
||||||
false
|
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
|
* concrete verification flow, i.e. we can show/scan a QR code or start emoji
|
||||||
* verification.
|
* verification.
|
||||||
*/
|
*/
|
||||||
internal fun isReady(): Boolean {
|
// internal fun isReady(): Boolean {
|
||||||
return innerVerificationRequest.isReady()
|
// return innerVerificationRequest.isReady()
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** Did we advertise that we're able to scan QR codes */
|
/** Did we advertise that we're able to scan QR codes */
|
||||||
internal fun canScanQrCodes(): Boolean {
|
internal fun canScanQrCodes(): Boolean {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user