mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
crypto: Configure decryption trustRequirement based on config flag (#3358)
* crypto: Configure decryption trustRequirement based on config flag * quick review
This commit is contained in:
parent
c087ece3bb
commit
cf81072ff3
@ -35,9 +35,13 @@ extension ClientBuilder {
|
|||||||
.autoEnableBackups(autoEnableBackups: true)
|
.autoEnableBackups(autoEnableBackups: true)
|
||||||
|
|
||||||
if enableOnlySignedDeviceIsolationMode {
|
if enableOnlySignedDeviceIsolationMode {
|
||||||
builder = builder.roomKeyRecipientStrategy(strategy: CollectStrategy.identityBasedStrategy)
|
builder = builder
|
||||||
|
.roomKeyRecipientStrategy(strategy: .identityBasedStrategy)
|
||||||
|
.roomDecryptionTrustRequirement(trustRequirement: .crossSignedOrLegacy)
|
||||||
} else {
|
} else {
|
||||||
builder = builder.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))
|
builder = builder
|
||||||
|
.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))
|
||||||
|
.roomDecryptionTrustRequirement(trustRequirement: .untrusted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ struct DeveloperOptionsScreen: View {
|
|||||||
|
|
||||||
Section {
|
Section {
|
||||||
Toggle(isOn: $context.enableOnlySignedDeviceIsolationMode) {
|
Toggle(isOn: $context.enableOnlySignedDeviceIsolationMode) {
|
||||||
Text("Exclude not secure devices when sending/receiving messages")
|
Text("Exclude insecure devices when sending/receiving messages")
|
||||||
Text("Requires app reboot")
|
Text("Requires app reboot")
|
||||||
}
|
}
|
||||||
} header: {
|
} header: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user