Skip to content

Commit

Permalink
crypto: Configure decryption trustRequirement based on config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
BillCarsonFr committed Oct 7, 2024
1 parent e6f4dd3 commit a3ff9ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions ElementX/Sources/Other/Extensions/ClientBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ extension ClientBuilder {
.autoEnableBackups(autoEnableBackups: true)

if enableOnlySignedDeviceIsolationMode {
builder = builder.roomKeyRecipientStrategy(strategy: CollectStrategy.identityBasedStrategy)
builder = builder
.roomKeyRecipientStrategy(strategy: CollectStrategy.identityBasedStrategy)
.roomDecryptionTrustRequirement(trustRequirement: TrustRequirement.crossSignedOrLegacy)

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

cannot find 'TrustRequirement' in scope

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

cannot find 'TrustRequirement' in scope

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

cannot find 'TrustRequirement' in scope

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

cannot find 'TrustRequirement' in scope

Check failure on line 40 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'
} else {
builder = builder.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))
builder = builder
.roomKeyRecipientStrategy(strategy: .deviceBasedStrategy(onlyAllowTrustedDevices: false, errorOnVerifiedUserProblem: true))
.roomDecryptionTrustRequirement(trustRequirement: TrustRequirement.untrusted)

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

cannot find 'TrustRequirement' in scope

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

cannot find 'TrustRequirement' in scope

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

cannot find 'TrustRequirement' in scope

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

cannot find 'TrustRequirement' in scope

Check failure on line 44 in ElementX/Sources/Other/Extensions/ClientBuilder.swift

View workflow job for this annotation

GitHub Actions / Tests (Enterprise)

value of type 'ClientBuilder' has no member 'roomDecryptionTrustRequirement'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct DeveloperOptionsScreen: View {

Section {
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")
}
} header: {
Expand Down

0 comments on commit a3ff9ac

Please sign in to comment.