Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate MXLegacyCrypto #7508

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions Config/CommonConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ class CommonConfiguration: NSObject, Configurable {

sdkOptions.enableNewClientInformationFeature = RiotSettings.shared.enableClientInformationFeature

// Configure Crypto SDK feature deciding which crypto module to use
sdkOptions.cryptoSDKFeature = CryptoSDKFeature.shared
sdkOptions.cryptoMigrationDelegate = self
}

private func makeASCIIUserAgent() -> String? {
Expand Down Expand Up @@ -168,14 +167,16 @@ class CommonConfiguration: NSObject, Configurable {
if RiotSettings.shared.allowStunServerFallback, let stunServerFallback = BuildSettings.stunServerFallbackUrlString {
callManager.fallbackSTUNServer = stunServerFallback
}
}
}

extension CommonConfiguration: MXCryptoV2MigrationDelegate {
var needsVerificationUpgrade: Bool {
get {
RiotSettings.shared.showVerificationUpgradeAlert
}
set {
RiotSettings.shared.showVerificationUpgradeAlert = newValue
}
}


// MARK: - Per loaded matrix session settings

func setupSettingsWhenLoaded(for matrixSession: MXSession) {
// Do not warn for unknown devices. We have cross-signing now
(matrixSession.crypto as? MXLegacyCrypto)?.warnOnUnknowDevices = false
}

}
3 changes: 0 additions & 3 deletions Config/Configurable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,4 @@ import MatrixSDK

// MARK: - Per matrix session settings
func setupSettings(for matrixSession: MXSession)

// MARK: - Per loaded matrix session settings
func setupSettingsWhenLoaded(for matrixSession: MXSession)
}
3 changes: 0 additions & 3 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,6 @@ Tap the + to start adding people.";
"settings_labs_enable_new_app_layout" = "New Application Layout";
"settings_labs_enable_wysiwyg_composer" = "Try out the rich text editor";
"settings_labs_enable_voice_broadcast" = "Voice broadcast";
"settings_labs_enable_crypto_sdk" = "Rust end-to-end encryption";
"settings_labs_confirm_crypto_sdk" = "Please be advised that as this feature is still in its experimental stage, it may not function as expected and could potentially have unintended consequences. To revert the feature, simply log out and log back in. Use at your own discretion and with caution.";
"settings_labs_disable_crypto_sdk" = "Rust end-to-end encryption (log out to disable)";

"settings_version" = "Version %@";
"settings_olm_version" = "Olm Version %@";
Expand Down
1 change: 0 additions & 1 deletion Riot/Categories/MXBugReportRestClient+Riot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ extension MXBugReportRestClient {

// SDKs
userInfo["matrix_sdk_version"] = MatrixSDKVersion
userInfo["crypto_module"] = MXSDKOptions.sharedInstance().cryptoModuleId
if let crypto = mainAccount?.mxSession?.crypto {
userInfo["crypto_module_version"] = crypto.version
}
Expand Down
116 changes: 0 additions & 116 deletions Riot/Experiments/CryptoSDKFeature.swift

This file was deleted.

12 changes: 0 additions & 12 deletions Riot/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7647,18 +7647,10 @@ public class VectorL10n: NSObject {
public static var settingsLabs: String {
return VectorL10n.tr("Vector", "settings_labs")
}
/// Please be advised that as this feature is still in its experimental stage, it may not function as expected and could potentially have unintended consequences. To revert the feature, simply log out and log back in. Use at your own discretion and with caution.
public static var settingsLabsConfirmCryptoSdk: String {
return VectorL10n.tr("Vector", "settings_labs_confirm_crypto_sdk")
}
/// Create conference calls with jitsi
public static var settingsLabsCreateConferenceWithJitsi: String {
return VectorL10n.tr("Vector", "settings_labs_create_conference_with_jitsi")
}
/// Rust end-to-end encryption (log out to disable)
public static var settingsLabsDisableCryptoSdk: String {
return VectorL10n.tr("Vector", "settings_labs_disable_crypto_sdk")
}
/// End-to-End Encryption
public static var settingsLabsE2eEncryption: String {
return VectorL10n.tr("Vector", "settings_labs_e2e_encryption")
Expand All @@ -7671,10 +7663,6 @@ public class VectorL10n: NSObject {
public static var settingsLabsEnableAutoReportDecryptionErrors: String {
return VectorL10n.tr("Vector", "settings_labs_enable_auto_report_decryption_errors")
}
/// Rust end-to-end encryption
public static var settingsLabsEnableCryptoSdk: String {
return VectorL10n.tr("Vector", "settings_labs_enable_crypto_sdk")
}
/// Live location sharing - share current location (active development, and temporarily, locations persist in room history)
public static var settingsLabsEnableLiveLocationSharing: String {
return VectorL10n.tr("Vector", "settings_labs_enable_live_location_sharing")
Expand Down
2 changes: 1 addition & 1 deletion Riot/Modules/Analytics/Analytics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ extension Analytics {
func trackE2EEError(_ reason: DecryptionFailureReason, context: String) {
let event = AnalyticsEvent.Error(
context: context,
cryptoModule: MXSDKOptions.sharedInstance().enableCryptoSDK ? .Rust : .Native,
cryptoModule: .Rust,
domain: .E2EE,
name: reason.errorName
)
Expand Down
3 changes: 0 additions & 3 deletions Riot/Modules/Analytics/SentryMonitoringClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ struct SentryMonitoringClient {
if let message = event.message?.formatted {
event.fingerprint = [message]
}
event.tags = [
"crypto_module": MXSDKOptions.sharedInstance().cryptoModuleId
]
MXLog.debug("[SentryMonitoringClient] Issue detected: \(event)")
return event
}
Expand Down
Loading