mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-18 04:08:44 +03:00
Post rebase fix
This commit is contained in:
parent
9a08f5ec4e
commit
e2e4ddf5ba
11 changed files with 6 additions and 16 deletions
|
@ -107,7 +107,7 @@ interface SharedSecretStorageService {
|
|||
* @param secretKey the secret key to use (@see #Curve25519AesSha2KeySpec)
|
||||
*
|
||||
*/
|
||||
fun getSecret(name: String, keyId: String?, secretKey: SSSSKeySpec, callback: MatrixCallback<String>)
|
||||
fun getSecret(name: String, keyId: String?, secretKey: SsssKeySpec, callback: MatrixCallback<String>)
|
||||
|
||||
fun checkShouldBeAbleToAccessSecrets(secretNames: List<String>, keyId: String?) : IntegrityResult
|
||||
}
|
||||
|
|
|
@ -330,7 +330,6 @@ internal class DefaultSharedSecretStorageService @Inject constructor(
|
|||
}
|
||||
|
||||
override fun checkShouldBeAbleToAccessSecrets(secretNames: List<String>, keyId: String?): IntegrityResult {
|
||||
|
||||
if (secretNames.isEmpty()) {
|
||||
return IntegrityResult.Error(SharedSecretStorageError.UnknownSecret("none"))
|
||||
}
|
||||
|
|
|
@ -1107,7 +1107,6 @@ internal class RealmCryptoStore @Inject constructor(
|
|||
level.locallyVerified = trusted
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@ internal class DefaultQrCodeVerificationTransaction(
|
|||
private fun trust(canTrustOtherUserMasterKey: Boolean, toVerifyDeviceIds: List<String>) {
|
||||
// If not me sign his MSK and upload the signature
|
||||
if (canTrustOtherUserMasterKey) {
|
||||
if (otherUserId != userId ) {
|
||||
if (otherUserId != userId) {
|
||||
// we should trust this master key
|
||||
// And check verification MSK -> SSK?
|
||||
crossSigningService.trustUser(otherUserId, object : MatrixCallback<Unit> {
|
||||
|
@ -232,7 +232,7 @@ internal class DefaultQrCodeVerificationTransaction(
|
|||
}
|
||||
})
|
||||
} else {
|
||||
//Mark my keys as trusted locally
|
||||
// Mark my keys as trusted locally
|
||||
crossSigningService.markMyMasterKeyAsTrusted()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import io.reactivex.disposables.CompositeDisposable
|
|||
import io.reactivex.disposables.Disposable
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
import kotlinx.android.synthetic.main.activity.*
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
||||
class SharedSecureStorageActivity : SimpleFragmentActivity() {
|
||||
|
@ -70,7 +69,6 @@ class SharedSecureStorageActivity : SimpleFragmentActivity() {
|
|||
addFragment(R.id.container, SharedSecuredStoragePassphraseFragment::class.java)
|
||||
}
|
||||
|
||||
|
||||
viewModel.viewEvents
|
||||
.observe()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
|
|
|
@ -37,7 +37,6 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import java.io.ByteArrayOutputStream
|
||||
|
||||
data class SharedSecureStorageViewState(
|
||||
|
@ -135,7 +134,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
_viewEvents.post(SharedSecureStorageViewEvent.HideModalLoading)
|
||||
val safeForIntentCypher = ByteArrayOutputStream().also {
|
||||
it.use {
|
||||
session.securelyStoreObject(decryptedSecretMap as Map<String,String>, args.resultKeyStoreAlias, it)
|
||||
session.securelyStoreObject(decryptedSecretMap as Map<String, String>, args.resultKeyStoreAlias, it)
|
||||
}
|
||||
}.toByteArray().toBase64NoPadding()
|
||||
_viewEvents.post(SharedSecureStorageViewEvent.FinishSuccess(safeForIntentCypher))
|
||||
|
|
|
@ -36,7 +36,6 @@ import im.vector.riotx.core.extensions.showPassword
|
|||
import im.vector.riotx.core.platform.VectorBaseFragment
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import me.gujun.android.span.span
|
||||
import timber.log.Timber
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class SharedSecuredStoragePassphraseFragment : VectorBaseFragment() {
|
||||
|
@ -94,7 +93,6 @@ class SharedSecuredStoragePassphraseFragment : VectorBaseFragment() {
|
|||
}
|
||||
.disposeOnDestroyView()
|
||||
|
||||
|
||||
mPassphraseTextEdit.textChanges()
|
||||
.subscribe {
|
||||
mPassphraseInputLayout.error = null
|
||||
|
|
|
@ -97,7 +97,7 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
|||
is VerificationBottomSheetViewEvents.AccessSecretStore -> {
|
||||
startActivityForResult(SharedSecureStorageActivity.newIntent(
|
||||
requireContext(),
|
||||
null,// use default key
|
||||
null, // use default key
|
||||
listOf(MASTER_KEY_SSSS_NAME, USER_SIGNING_KEY_SSSS_NAME, SELF_SIGNING_KEY_SSSS_NAME),
|
||||
SharedSecureStorageActivity.RESULT_KEYSTORE_ALIAS
|
||||
), SECRET_REQUEST_CODE)
|
||||
|
@ -108,7 +108,6 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment() {
|
|||
.setMessage(it.errorMessage)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.ok) { _, _ ->
|
||||
|
||||
}
|
||||
.show()
|
||||
Unit
|
||||
|
|
|
@ -266,7 +266,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(@Assisted ini
|
|||
try {
|
||||
action.cypherData.fromBase64NoPadding().inputStream().use { ins ->
|
||||
val res = session.loadSecureSecret<Map<String, String>>(ins, action.alias)
|
||||
val trustResult = session.getCrossSigningService().checkTrustFromPrivateKeys(
|
||||
val trustResult = session.cryptoService().crossSigningService().checkTrustFromPrivateKeys(
|
||||
res?.get(MASTER_KEY_SSSS_NAME),
|
||||
res?.get(USER_SIGNING_KEY_SSSS_NAME),
|
||||
res?.get(SELF_SIGNING_KEY_SSSS_NAME)
|
||||
|
|
|
@ -83,7 +83,6 @@ class VerificationRequestController @Inject constructor(
|
|||
iconColor(colorProvider.getColor(R.color.riotx_destructive_accent))
|
||||
listener { listener?.onClickDismiss() }
|
||||
}
|
||||
|
||||
} else {
|
||||
val styledText = matrixItem.let {
|
||||
stringProvider.getString(R.string.verification_request_notice, it.id)
|
||||
|
|
|
@ -145,7 +145,6 @@ class HomeActivity : VectorBaseActivity(), ToolbarConfigurable {
|
|||
val crossSigningEnabledOnAccount = myCrossSigningKeys != null
|
||||
|
||||
if (crossSigningEnabledOnAccount && myCrossSigningKeys?.isTrusted() == false) {
|
||||
|
||||
// We need to ask
|
||||
sharedActionViewModel.hasDisplayedCompleteSecurityPrompt = true
|
||||
PopupAlertManager.postVectorAlert(
|
||||
|
|
Loading…
Add table
Reference in a new issue