From 9d80b9e341b47154671afe98793a4f4583f9740c Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Thu, 26 Jan 2023 20:02:31 +0000 Subject: [PATCH 1/9] Generate crypto store key --- Riot/Assets/en.lproj/Vector.strings | 6 ++-- .../MatrixSDKCrypto+LocalizedError.swift | 31 +++++++++++++++++++ Riot/Generated/Strings.swift | 6 ++-- .../EncryptionKeyManager.swift | 12 +++++++ .../Modules/Settings/SettingsViewController.m | 2 +- changelog.d/pr-7310.change | 1 + 6 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 Riot/Categories/MatrixSDKCrypto+LocalizedError.swift create mode 100644 changelog.d/pr-7310.change diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 5d7ac9e4a..2c555f6fc 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -804,9 +804,9 @@ 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" = "Enable new rust-based Crypto SDK"; -"settings_labs_confirm_crypto_sdk" = "This action cannot be undone"; -"settings_labs_disable_crypto_sdk" = "Crypto SDK is enabled. To disable please reinstall the app"; +"settings_labs_enable_crypto_sdk" = "End-to-end encryption 2.0"; +"settings_labs_confirm_crypto_sdk" = "This option will enable a new, faster and more reliable engine for end-to-end encryption written in Rust. Once enabled, you will need to log out to disable it. Do you wish to proceed?"; +"settings_labs_disable_crypto_sdk" = "End-to-end encryption 2.0 (log out to disable)"; "settings_version" = "Version %@"; "settings_olm_version" = "Olm Version %@"; diff --git a/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift b/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift new file mode 100644 index 000000000..d802d54ff --- /dev/null +++ b/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift @@ -0,0 +1,31 @@ +// +// Copyright 2023 New Vector Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation + +#if DEBUG + +import MatrixSDKCrypto + +extension CryptoStoreError: LocalizedError { + public var errorDescription: String? { + // We dont really care about the type of error here when showing to the user. + // Details about the error are tracked independently + return VectorL10n.e2eNeedLogInAgain + } +} + +#endif diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index d42977875..5df732af1 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -7583,7 +7583,7 @@ public class VectorL10n: NSObject { public static var settingsLabs: String { return VectorL10n.tr("Vector", "settings_labs") } - /// This action cannot be undone + /// This option will enable a new, faster and more reliable engine for end-to-end encryption written in Rust. Once enabled, you will need to log out to disable it. Do you wish to proceed? public static var settingsLabsConfirmCryptoSdk: String { return VectorL10n.tr("Vector", "settings_labs_confirm_crypto_sdk") } @@ -7591,7 +7591,7 @@ public class VectorL10n: NSObject { public static var settingsLabsCreateConferenceWithJitsi: String { return VectorL10n.tr("Vector", "settings_labs_create_conference_with_jitsi") } - /// Crypto SDK is enabled. To disable please reinstall the app + /// End-to-end encryption 2.0 (log out to disable) public static var settingsLabsDisableCryptoSdk: String { return VectorL10n.tr("Vector", "settings_labs_disable_crypto_sdk") } @@ -7607,7 +7607,7 @@ public class VectorL10n: NSObject { public static var settingsLabsEnableAutoReportDecryptionErrors: String { return VectorL10n.tr("Vector", "settings_labs_enable_auto_report_decryption_errors") } - /// Enable new rust-based Crypto SDK + /// End-to-end encryption 2.0 public static var settingsLabsEnableCryptoSdk: String { return VectorL10n.tr("Vector", "settings_labs_enable_crypto_sdk") } diff --git a/Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift b/Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift index 5085e9efb..484a63832 100644 --- a/Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift +++ b/Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift @@ -31,6 +31,7 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { private static let cryptoOlmPickleKey: KeyValueStoreKey = "cryptoOlmPickleKey" private static let roomLastMessageIv: KeyValueStoreKey = "roomLastMessageIv" private static let roomLastMessageAesKey: KeyValueStoreKey = "roomLastMessageAesKey" + private static let cryptoSDKStoreKey: KeyValueStoreKey = "cryptoSDKStoreKey" private let keychainStore: KeyValueStore = KeychainStore(withKeychain: Keychain(service: keychainService, accessGroup: BuildSettings.keychainAccessGroup)) @@ -47,6 +48,7 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { generateKeyIfNotExists(forKey: EncryptionKeyManager.cryptoOlmPickleKey, size: 32) generateIvIfNotExists(forKey: EncryptionKeyManager.roomLastMessageIv) generateAesKeyIfNotExists(forKey: EncryptionKeyManager.roomLastMessageAesKey) + generateKeyIfNotExists(forKey: EncryptionKeyManager.cryptoSDKStoreKey, size: 32) assert(keychainStore.containsObject(forKey: EncryptionKeyManager.contactsIv), "[EncryptionKeyManager] initKeys: Failed to generate IV for acount") assert(keychainStore.containsObject(forKey: EncryptionKeyManager.contactsAesKey), "[EncryptionKeyManager] initKeys: Failed to generate AES Key for acount") @@ -55,6 +57,7 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { assert(keychainStore.containsObject(forKey: EncryptionKeyManager.cryptoOlmPickleKey), "[EncryptionKeyManager] initKeys: Failed to generate Key for olm pickle key") assert(keychainStore.containsObject(forKey: EncryptionKeyManager.roomLastMessageIv), "[EncryptionKeyManager] initKeys: Failed to generate IV for room last message") assert(keychainStore.containsObject(forKey: EncryptionKeyManager.roomLastMessageAesKey), "[EncryptionKeyManager] initKeys: Failed to generate AES Key for room last message encryption") + assert(keychainStore.containsObject(forKey: EncryptionKeyManager.cryptoSDKStoreKey), "[EncryptionKeyManager] initKeys: Failed to generate Key for crypto sdk store") } // MARK: - MXKeyProviderDelegate @@ -64,6 +67,7 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { || dataType == MXKAccountManagerDataType || dataType == MXCryptoOlmPickleKeyDataType || dataType == MXRoomLastMessageDataType + || dataType == MXCryptoSDKStoreKeyDataType } func hasKeyForData(ofType dataType: String) -> Bool { @@ -77,7 +81,10 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { case MXRoomLastMessageDataType: return keychainStore.containsObject(forKey: EncryptionKeyManager.roomLastMessageIv) && keychainStore.containsObject(forKey: EncryptionKeyManager.roomLastMessageAesKey) + case MXCryptoSDKStoreKeyDataType: + return keychainStore.containsObject(forKey: EncryptionKeyManager.cryptoSDKStoreKey) default: + MXLog.warning("[EncryptionKeyManager] hasKeyForData: No key for \(dataType)") return false } } @@ -103,7 +110,12 @@ class EncryptionKeyManager: NSObject, MXKeyProviderDelegate { let aesKey = try? keychainStore.data(forKey: EncryptionKeyManager.roomLastMessageAesKey) { return MXAesKeyData(iv: ivKey, key: aesKey) } + case MXCryptoSDKStoreKeyDataType: + if let key = try? keychainStore.data(forKey: EncryptionKeyManager.cryptoSDKStoreKey) { + return MXRawDataKey(key: key) + } default: + MXLog.failure("[EncryptionKeyManager] keyDataForData: Attempting to get data for unknown type", dataType) return nil } return nil diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 90533cfd1..fc10edf0e 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -3386,7 +3386,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> MXWeakify(self); [currentAlert dismissViewControllerAnimated:NO completion:nil]; - UIAlertController *confirmationAlert = [UIAlertController alertControllerWithTitle:nil + UIAlertController *confirmationAlert = [UIAlertController alertControllerWithTitle:VectorL10n.settingsLabsEnableCryptoSdk message:VectorL10n.settingsLabsConfirmCryptoSdk preferredStyle:UIAlertControllerStyleAlert]; diff --git a/changelog.d/pr-7310.change b/changelog.d/pr-7310.change new file mode 100644 index 000000000..4ba5e9ee1 --- /dev/null +++ b/changelog.d/pr-7310.change @@ -0,0 +1 @@ +CryptoV2: Generate Crypto SDK store key From 8c76c4a1ca1868e3dd101b5555734353023b0ee1 Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Mon, 30 Jan 2023 14:45:07 +0000 Subject: [PATCH 2/9] Display backup import progress --- Riot/Assets/en.lproj/Vector.strings | 1 + Riot/Generated/Strings.swift | 4 +++ ...verFromPrivateKeyViewController.storyboard | 26 ++++++++++++------- ...pRecoverFromPrivateKeyViewController.swift | 10 ++++--- ...BackupRecoverFromPrivateKeyViewModel.swift | 15 ++++++++++- ...BackupRecoverFromPrivateKeyViewState.swift | 2 +- changelog.d/pr-7319.change | 1 + 7 files changed, 45 insertions(+), 14 deletions(-) create mode 100644 changelog.d/pr-7319.change diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 2c555f6fc..4d56129eb 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -1469,6 +1469,7 @@ Tap the + to start adding people."; // Recover from private key "key_backup_recover_from_private_key_info" = "Restoring backup…"; +"key_backup_recover_from_private_key_progress" = "%@%% Complete"; // Recover from passphrase diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 5df732af1..47f6a77ae 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -2755,6 +2755,10 @@ public class VectorL10n: NSObject { public static var keyBackupRecoverFromPrivateKeyInfo: String { return VectorL10n.tr("Vector", "key_backup_recover_from_private_key_info") } + /// %@%% Complete + public static func keyBackupRecoverFromPrivateKeyProgress(_ p1: String) -> String { + return VectorL10n.tr("Vector", "key_backup_recover_from_private_key_progress", p1) + } /// Use your Security Key to unlock your secure message history public static var keyBackupRecoverFromRecoveryKeyInfo: String { return VectorL10n.tr("Vector", "key_backup_recover_from_recovery_key_info") diff --git a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.storyboard b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.storyboard index 1c8ba341c..42e99205e 100644 --- a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.storyboard +++ b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.storyboard @@ -1,25 +1,23 @@ - - - - + + - + - + - + - + @@ -40,15 +38,24 @@ + + + + @@ -72,6 +79,7 @@ + @@ -79,10 +87,10 @@ - + diff --git a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.swift b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.swift index 1aaf96e62..a02fed201 100644 --- a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.swift +++ b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewController.swift @@ -29,6 +29,7 @@ final class KeyBackupRecoverFromPrivateKeyViewController: UIViewController { @IBOutlet private weak var shieldImageView: UIImageView! @IBOutlet private weak var informationLabel: UILabel! + @IBOutlet private weak var progressLabel: UILabel! // MARK: Private @@ -118,8 +119,8 @@ final class KeyBackupRecoverFromPrivateKeyViewController: UIViewController { private func render(viewState: KeyBackupRecoverFromPrivateKeyViewState) { switch viewState { - case .loading: - self.renderLoading() + case .loading(let progress): + self.renderLoading(progress: progress) case .loaded: self.renderLoaded() case .error(let error): @@ -127,8 +128,11 @@ final class KeyBackupRecoverFromPrivateKeyViewController: UIViewController { } } - private func renderLoading() { + private func renderLoading(progress: Double) { self.activityPresenter.presentActivityIndicator(on: self.view, animated: true) + + let percent = Int(round(progress * 100)) + self.progressLabel.text = VectorL10n.keyBackupRecoverFromPrivateKeyProgress("\(percent)") } private func renderLoaded() { diff --git a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewModel.swift b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewModel.swift index cef1d7c0c..04fb48850 100644 --- a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewModel.swift +++ b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewModel.swift @@ -27,6 +27,7 @@ final class KeyBackupRecoverFromPrivateKeyViewModel: KeyBackupRecoverFromPrivate private let keyBackup: MXKeyBackup private var currentHTTPOperation: MXHTTPOperation? private let keyBackupVersion: MXKeyBackupVersion + private var progressUpdateTimer: Timer? // MARK: Public @@ -56,7 +57,14 @@ final class KeyBackupRecoverFromPrivateKeyViewModel: KeyBackupRecoverFromPrivate private func recoverWithPrivateKey() { - self.update(viewState: .loading) + self.update(viewState: .loading(0)) + + // Update loading progress every second until no longer loading + progressUpdateTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true) { [weak self] _ in + if let progress = self?.keyBackup.importProgress { + self?.update(viewState: .loading(progress.fractionCompleted)) + } + } self.currentHTTPOperation = keyBackup.restore(usingPrivateKeyKeyBackup: keyBackupVersion, room: nil, session: nil, success: { [weak self] (_, _) in guard let self = self else { @@ -91,6 +99,11 @@ final class KeyBackupRecoverFromPrivateKeyViewModel: KeyBackupRecoverFromPrivate } private func update(viewState: KeyBackupRecoverFromPrivateKeyViewState) { + if case .loading = viewState {} else { + progressUpdateTimer?.invalidate() + progressUpdateTimer = nil + } + self.viewDelegate?.keyBackupRecoverFromPrivateKeyViewModel(self, didUpdateViewState: viewState) } } diff --git a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewState.swift b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewState.swift index bdd417853..b4ef05fb9 100644 --- a/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewState.swift +++ b/Riot/Modules/KeyBackup/Recover/PrivateKey/KeyBackupRecoverFromPrivateKeyViewState.swift @@ -20,7 +20,7 @@ import Foundation /// KeyBackupRecoverFromPrivateKeyViewController view state enum KeyBackupRecoverFromPrivateKeyViewState { - case loading + case loading(Double) case loaded case error(Error) } diff --git a/changelog.d/pr-7319.change b/changelog.d/pr-7319.change new file mode 100644 index 000000000..187b315b5 --- /dev/null +++ b/changelog.d/pr-7319.change @@ -0,0 +1 @@ +Backup: Display backup import progress From 246c5a0c450f6b4fc1b36b4c73ee1a298bf1b6ea Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Tue, 31 Jan 2023 13:07:16 +0000 Subject: [PATCH 3/9] Reset Crypto SDK on logout --- Config/AppConfiguration.swift | 3 + Config/CommonConfiguration.swift | 6 -- Config/CryptoSDKConfiguration.swift | 55 +++++++++++++++++++ Riot/Modules/Application/LegacyAppDelegate.m | 5 ++ .../Modules/Settings/SettingsViewController.m | 3 +- changelog.d/pr-7323.change | 1 + 6 files changed, 65 insertions(+), 8 deletions(-) create mode 100644 Config/CryptoSDKConfiguration.swift create mode 100644 changelog.d/pr-7323.change diff --git a/Config/AppConfiguration.swift b/Config/AppConfiguration.swift index 70b1d78d5..fe83fba1f 100644 --- a/Config/AppConfiguration.swift +++ b/Config/AppConfiguration.swift @@ -24,6 +24,9 @@ class AppConfiguration: CommonConfiguration { override func setupSettings() { super.setupSettings() setupAppSettings() +#if DEBUG + CryptoSDKConfiguration.shared.setup() +#endif } private func setupAppSettings() { diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index f3172a710..fee3796ff 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -91,12 +91,6 @@ class CommonConfiguration: NSObject, Configurable { MXKeyProvider.sharedInstance().delegate = EncryptionKeyManager.shared sdkOptions.enableNewClientInformationFeature = RiotSettings.shared.enableClientInformationFeature - - #if DEBUG - if sdkOptions.isCryptoSDKAvailable { - sdkOptions.enableCryptoSDK = RiotSettings.shared.enableCryptoSDK - } - #endif } private func makeASCIIUserAgent() -> String? { diff --git a/Config/CryptoSDKConfiguration.swift b/Config/CryptoSDKConfiguration.swift new file mode 100644 index 000000000..6edde7871 --- /dev/null +++ b/Config/CryptoSDKConfiguration.swift @@ -0,0 +1,55 @@ +// +// Copyright 2023 New Vector Ltd +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import Foundation + +#if DEBUG + +/// Configuration for enabling / disabling Matrix Crypto SDK +@objcMembers class CryptoSDKConfiguration: NSObject { + static let shared = CryptoSDKConfiguration() + + func setup() { + guard MXSDKOptions.sharedInstance().isCryptoSDKAvailable else { + return + } + + let isEnabled = RiotSettings.shared.enableCryptoSDK + MXSDKOptions.sharedInstance().enableCryptoSDK = isEnabled + + MXLog.debug("[CryptoSDKConfiguration] setup: Crypto SDK is \(isEnabled ? "enabled" : "disabled")") + } + + func enable() { + guard MXSDKOptions.sharedInstance().isCryptoSDKAvailable else { + return + } + + RiotSettings.shared.enableCryptoSDK = true + MXSDKOptions.sharedInstance().enableCryptoSDK = true + + MXLog.debug("[CryptoSDKConfiguration] enabling Crypto SDK") + } + + func disable() { + RiotSettings.shared.enableCryptoSDK = false + MXSDKOptions.sharedInstance().enableCryptoSDK = false + + MXLog.debug("[CryptoSDKConfiguration] disabling Crypto SDK") + } +} + +#endif diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index 7bf51dd46..1fb151e20 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -2183,6 +2183,11 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni // Clear cache [self clearCache]; + // Reset Crypto SDK configuration (labs flag for which crypto module to use) +#if DEBUG + [CryptoSDKConfiguration.shared disable]; +#endif + // Reset key backup banner preferences [SecureBackupBannerPreferences.shared reset]; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index fc10edf0e..5cf6e933b 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -3400,8 +3400,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> [confirmationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); - RiotSettings.shared.enableCryptoSDK = isEnabled; - MXSDKOptions.sharedInstance.enableCryptoSDK = isEnabled; + [CryptoSDKConfiguration.shared enable]; [[AppDelegate theDelegate] reloadMatrixSessions:YES]; }]]; diff --git a/changelog.d/pr-7323.change b/changelog.d/pr-7323.change new file mode 100644 index 000000000..308cf2813 --- /dev/null +++ b/changelog.d/pr-7323.change @@ -0,0 +1 @@ +CryptoV2: Reset Crypto SDK on logout From 3614f5ab05db73c5a11ce811a425a4f685f76116 Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Wed, 1 Feb 2023 11:49:16 +0000 Subject: [PATCH 4/9] Fix crypto v2 config --- Config/AppConfiguration.swift | 3 --- Config/CommonConfiguration.swift | 10 ++++++++++ Config/CryptoSDKConfiguration.swift | 11 ----------- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/Config/AppConfiguration.swift b/Config/AppConfiguration.swift index fe83fba1f..70b1d78d5 100644 --- a/Config/AppConfiguration.swift +++ b/Config/AppConfiguration.swift @@ -24,9 +24,6 @@ class AppConfiguration: CommonConfiguration { override func setupSettings() { super.setupSettings() setupAppSettings() -#if DEBUG - CryptoSDKConfiguration.shared.setup() -#endif } private func setupAppSettings() { diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index fee3796ff..b98195e6d 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -91,6 +91,16 @@ class CommonConfiguration: NSObject, Configurable { MXKeyProvider.sharedInstance().delegate = EncryptionKeyManager.shared sdkOptions.enableNewClientInformationFeature = RiotSettings.shared.enableClientInformationFeature + + #if DEBUG + if sdkOptions.isCryptoSDKAvailable { + let isEnabled = RiotSettings.shared.enableCryptoSDK + MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is \(isEnabled ? "enabled" : "disabled")") + sdkOptions.enableCryptoSDK = isEnabled + } else { + MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is not available)") + } + #endif } private func makeASCIIUserAgent() -> String? { diff --git a/Config/CryptoSDKConfiguration.swift b/Config/CryptoSDKConfiguration.swift index 6edde7871..935988ba9 100644 --- a/Config/CryptoSDKConfiguration.swift +++ b/Config/CryptoSDKConfiguration.swift @@ -22,17 +22,6 @@ import Foundation @objcMembers class CryptoSDKConfiguration: NSObject { static let shared = CryptoSDKConfiguration() - func setup() { - guard MXSDKOptions.sharedInstance().isCryptoSDKAvailable else { - return - } - - let isEnabled = RiotSettings.shared.enableCryptoSDK - MXSDKOptions.sharedInstance().enableCryptoSDK = isEnabled - - MXLog.debug("[CryptoSDKConfiguration] setup: Crypto SDK is \(isEnabled ? "enabled" : "disabled")") - } - func enable() { guard MXSDKOptions.sharedInstance().isCryptoSDKAvailable else { return From 82bae5b210d74c27a9dcf467fe9dbd57f90350bd Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Thu, 2 Feb 2023 10:03:33 +0000 Subject: [PATCH 5/9] Refresh notification service on crypto change --- RiotNSE/NotificationService.swift | 18 +++++++++++++++++- changelog.d/pr-7332.change | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 changelog.d/pr-7332.change diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index f9779641f..aca892844 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -41,6 +41,9 @@ class NotificationService: UNNotificationServiceExtension { private var ongoingVoIPPushRequests: [String: Bool] = [:] private var userAccount: MXKAccount? + #if DEBUG + private var isCryptoSDKEnabled = false + #endif /// Best attempt contents. Will be updated incrementally, if something fails during the process, this best attempt content will be showed as notification. Keys are eventId's private var bestAttemptContents: [String: UNMutableNotificationContent] = [:] @@ -195,7 +198,7 @@ class NotificationService: UNNotificationServiceExtension { self.userAccount = MXKAccountManager.shared()?.activeAccounts.first if let userAccount = userAccount { Self.backgroundServiceInitQueue.sync { - if NotificationService.backgroundSyncService?.credentials != userAccount.mxCredentials { + if hasChangedCryptoSDK() || NotificationService.backgroundSyncService?.credentials != userAccount.mxCredentials { MXLog.debug("[NotificationService] setup: MXBackgroundSyncService init: BEFORE") self.logMemory() NotificationService.backgroundSyncService = MXBackgroundSyncService(withCredentials: userAccount.mxCredentials, persistTokenDataHandler: { persistTokenDataHandler in @@ -214,6 +217,19 @@ class NotificationService: UNNotificationServiceExtension { } } + /// Determine whether we have switched from using crypto v1 to v2 or vice versa which will require + /// rebuilding `MXBackgroundSyncService` + private func hasChangedCryptoSDK() -> Bool { + #if DEBUG + if isCryptoSDKEnabled != RiotSettings.shared.enableCryptoSDK { + isCryptoSDKEnabled = RiotSettings.shared.enableCryptoSDK + return true + } + #endif + + return false + } + /// Attempts to preprocess payload and attach room display name to the best attempt content /// - Parameters: /// - eventId: Event identifier to mutate best attempt content diff --git a/changelog.d/pr-7332.change b/changelog.d/pr-7332.change new file mode 100644 index 000000000..94a5bdc89 --- /dev/null +++ b/changelog.d/pr-7332.change @@ -0,0 +1 @@ +CryptoV2: Refresh notification service on crypto change From 5aa0ada7594cf47d9a97b2bf5c90a5177c8b8df3 Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Mon, 31 Oct 2022 12:23:52 +0000 Subject: [PATCH 6/9] Enable Crypto SDK for production --- Config/CommonConfiguration.swift | 3 +-- Config/CryptoSDKConfiguration.swift | 6 ++---- .../MatrixSDKCrypto+LocalizedError.swift | 5 ----- Riot/Managers/Settings/RiotSettings.swift | 2 -- Riot/Modules/Application/LegacyAppDelegate.m | 2 -- .../Home/AllChats/AllChatsViewController.swift | 10 ++++++---- Riot/Modules/Settings/SettingsViewController.m | 6 ------ RiotNSE/NotificationService.swift | 14 +++++--------- changelog.d/pr-7333.change | 1 + 9 files changed, 15 insertions(+), 34 deletions(-) create mode 100644 changelog.d/pr-7333.change diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index b98195e6d..a8b420b20 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -92,15 +92,14 @@ class CommonConfiguration: NSObject, Configurable { sdkOptions.enableNewClientInformationFeature = RiotSettings.shared.enableClientInformationFeature - #if DEBUG if sdkOptions.isCryptoSDKAvailable { let isEnabled = RiotSettings.shared.enableCryptoSDK MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is \(isEnabled ? "enabled" : "disabled")") sdkOptions.enableCryptoSDK = isEnabled + sdkOptions.enableStartupProgress = isEnabled } else { MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is not available)") } - #endif } private func makeASCIIUserAgent() -> String? { diff --git a/Config/CryptoSDKConfiguration.swift b/Config/CryptoSDKConfiguration.swift index 935988ba9..3c922e547 100644 --- a/Config/CryptoSDKConfiguration.swift +++ b/Config/CryptoSDKConfiguration.swift @@ -16,8 +16,6 @@ import Foundation -#if DEBUG - /// Configuration for enabling / disabling Matrix Crypto SDK @objcMembers class CryptoSDKConfiguration: NSObject { static let shared = CryptoSDKConfiguration() @@ -29,6 +27,7 @@ import Foundation RiotSettings.shared.enableCryptoSDK = true MXSDKOptions.sharedInstance().enableCryptoSDK = true + MXSDKOptions.sharedInstance().enableStartupProgress = true MXLog.debug("[CryptoSDKConfiguration] enabling Crypto SDK") } @@ -36,9 +35,8 @@ import Foundation func disable() { RiotSettings.shared.enableCryptoSDK = false MXSDKOptions.sharedInstance().enableCryptoSDK = false + MXSDKOptions.sharedInstance().enableStartupProgress = false MXLog.debug("[CryptoSDKConfiguration] disabling Crypto SDK") } } - -#endif diff --git a/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift b/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift index d802d54ff..4b314a0c1 100644 --- a/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift +++ b/Riot/Categories/MatrixSDKCrypto+LocalizedError.swift @@ -15,9 +15,6 @@ // import Foundation - -#if DEBUG - import MatrixSDKCrypto extension CryptoStoreError: LocalizedError { @@ -27,5 +24,3 @@ extension CryptoStoreError: LocalizedError { return VectorL10n.e2eNeedLogInAgain } } - -#endif diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index d9e64a1af..260a0aca7 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -192,11 +192,9 @@ final class RiotSettings: NSObject { @UserDefault(key: "enableVoiceBroadcast", defaultValue: false, storage: defaults) var enableVoiceBroadcast - #if DEBUG /// Flag indicating if we are using rust-based `MatrixCryptoSDK` instead of `MatrixSDK`'s internal crypto module @UserDefault(key: "enableCryptoSDK", defaultValue: false, storage: defaults) var enableCryptoSDK - #endif // MARK: Calls diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index 1fb151e20..302ba990e 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -2184,9 +2184,7 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni [self clearCache]; // Reset Crypto SDK configuration (labs flag for which crypto module to use) -#if DEBUG [CryptoSDKConfiguration.shared disable]; -#endif // Reset key backup banner preferences [SecureBackupBannerPreferences.shared reset]; diff --git a/Riot/Modules/Home/AllChats/AllChatsViewController.swift b/Riot/Modules/Home/AllChats/AllChatsViewController.swift index 4b7ff566c..3e689a42e 100644 --- a/Riot/Modules/Home/AllChats/AllChatsViewController.swift +++ b/Riot/Modules/Home/AllChats/AllChatsViewController.swift @@ -885,10 +885,12 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol { return } - let devices = mainSession.crypto.devices(forUser: mainSession.myUserId).values - let userHasOneUnverifiedDevice = devices.contains(where: {!$0.trustLevel.isCrossSigningVerified}) - if userHasOneUnverifiedDevice { - presentReviewUnverifiedSessionsAlert(with: session) + if let userId = mainSession.myUserId, let crypto = mainSession.crypto { + let devices = crypto.devices(forUser: userId).values + let userHasOneUnverifiedDevice = devices.contains(where: {!$0.trustLevel.isCrossSigningVerified}) + if userHasOneUnverifiedDevice { + presentReviewUnverifiedSessionsAlert(with: session) + } } } diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 5cf6e933b..93fffc9e8 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -588,12 +588,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate> if (BuildSettings.settingsScreenShowLabSettings) { Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS]; - #if DEBUG if (MXSDKOptions.sharedInstance.isCryptoSDKAvailable) { [sectionLabs addRowWithTag:LABS_ENABLE_CRYPTO_SDK]; } - #endif [sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX]; [sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX]; @@ -2593,7 +2591,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate> } else { - #if DEBUG if (row == LABS_ENABLE_CRYPTO_SDK) { MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; @@ -2606,7 +2603,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate> cell = labelAndSwitchCell; } - #endif } } else if (section == SECTION_TAG_SECURITY) @@ -3379,7 +3375,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate> RiotSettings.shared.enableVoiceBroadcast = sender.isOn; } -#if DEBUG - (void)toggleEnableCryptoSDKFeature:(UISwitch *)sender { BOOL isEnabled = sender.isOn; @@ -3407,7 +3402,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate> [self presentViewController:confirmationAlert animated:YES completion:nil]; currentAlert = confirmationAlert; } -#endif - (void)togglePinRoomsWithMissedNotif:(UISwitch *)sender { diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index aca892844..6560290ab 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -41,9 +41,7 @@ class NotificationService: UNNotificationServiceExtension { private var ongoingVoIPPushRequests: [String: Bool] = [:] private var userAccount: MXKAccount? - #if DEBUG private var isCryptoSDKEnabled = false - #endif /// Best attempt contents. Will be updated incrementally, if something fails during the process, this best attempt content will be showed as notification. Keys are eventId's private var bestAttemptContents: [String: UNMutableNotificationContent] = [:] @@ -201,6 +199,7 @@ class NotificationService: UNNotificationServiceExtension { if hasChangedCryptoSDK() || NotificationService.backgroundSyncService?.credentials != userAccount.mxCredentials { MXLog.debug("[NotificationService] setup: MXBackgroundSyncService init: BEFORE") self.logMemory() + NotificationService.backgroundSyncService = MXBackgroundSyncService(withCredentials: userAccount.mxCredentials, persistTokenDataHandler: { persistTokenDataHandler in MXKAccountManager.shared().readAndWriteCredentials(persistTokenDataHandler) }, unauthenticatedHandler: { error, softLogout, refreshTokenAuth, completion in @@ -220,14 +219,11 @@ class NotificationService: UNNotificationServiceExtension { /// Determine whether we have switched from using crypto v1 to v2 or vice versa which will require /// rebuilding `MXBackgroundSyncService` private func hasChangedCryptoSDK() -> Bool { - #if DEBUG - if isCryptoSDKEnabled != RiotSettings.shared.enableCryptoSDK { - isCryptoSDKEnabled = RiotSettings.shared.enableCryptoSDK - return true + guard isCryptoSDKEnabled != RiotSettings.shared.enableCryptoSDK else { + return false } - #endif - - return false + isCryptoSDKEnabled = RiotSettings.shared.enableCryptoSDK + return true } /// Attempts to preprocess payload and attach room display name to the best attempt content diff --git a/changelog.d/pr-7333.change b/changelog.d/pr-7333.change new file mode 100644 index 000000000..fbf81e873 --- /dev/null +++ b/changelog.d/pr-7333.change @@ -0,0 +1 @@ +CryptoV2: Enable Crypto SDK for production From 0caab633424ef99b3d34fae5553e314df00dabad Mon Sep 17 00:00:00 2001 From: Andy Uhnak Date: Thu, 2 Feb 2023 14:31:36 +0000 Subject: [PATCH 7/9] Track crypto sdk being enabled --- Config/CommonConfiguration.swift | 4 ++-- Riot/Assets/en.lproj/Vector.strings | 6 +++--- Riot/Generated/Strings.swift | 6 +++--- Riot/Modules/Analytics/Analytics.swift | 16 ++++++++++++++++ Riot/Modules/Settings/SettingsViewController.m | 11 +++++------ 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index a8b420b20..35001b1e4 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -94,11 +94,11 @@ class CommonConfiguration: NSObject, Configurable { if sdkOptions.isCryptoSDKAvailable { let isEnabled = RiotSettings.shared.enableCryptoSDK - MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is \(isEnabled ? "enabled" : "disabled")") + MXLog.debug("[CommonConfiguration] Crypto SDK is \(isEnabled ? "enabled" : "disabled")") sdkOptions.enableCryptoSDK = isEnabled sdkOptions.enableStartupProgress = isEnabled } else { - MXLog.debug("[CryptoSDKConfiguration] Crypto SDK is not available)") + MXLog.debug("[CommonConfiguration] Crypto SDK is not available)") } } diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 4d56129eb..3b2871460 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -804,9 +804,9 @@ 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" = "End-to-end encryption 2.0"; -"settings_labs_confirm_crypto_sdk" = "This option will enable a new, faster and more reliable engine for end-to-end encryption written in Rust. Once enabled, you will need to log out to disable it. Do you wish to proceed?"; -"settings_labs_disable_crypto_sdk" = "End-to-end encryption 2.0 (log out to disable)"; +"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 %@"; diff --git a/Riot/Generated/Strings.swift b/Riot/Generated/Strings.swift index 47f6a77ae..8c676d666 100644 --- a/Riot/Generated/Strings.swift +++ b/Riot/Generated/Strings.swift @@ -7587,7 +7587,7 @@ public class VectorL10n: NSObject { public static var settingsLabs: String { return VectorL10n.tr("Vector", "settings_labs") } - /// This option will enable a new, faster and more reliable engine for end-to-end encryption written in Rust. Once enabled, you will need to log out to disable it. Do you wish to proceed? + /// 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") } @@ -7595,7 +7595,7 @@ public class VectorL10n: NSObject { public static var settingsLabsCreateConferenceWithJitsi: String { return VectorL10n.tr("Vector", "settings_labs_create_conference_with_jitsi") } - /// End-to-end encryption 2.0 (log out to disable) + /// Rust end-to-end encryption (log out to disable) public static var settingsLabsDisableCryptoSdk: String { return VectorL10n.tr("Vector", "settings_labs_disable_crypto_sdk") } @@ -7611,7 +7611,7 @@ public class VectorL10n: NSObject { public static var settingsLabsEnableAutoReportDecryptionErrors: String { return VectorL10n.tr("Vector", "settings_labs_enable_auto_report_decryption_errors") } - /// End-to-end encryption 2.0 + /// Rust end-to-end encryption public static var settingsLabsEnableCryptoSdk: String { return VectorL10n.tr("Vector", "settings_labs_enable_crypto_sdk") } diff --git a/Riot/Modules/Analytics/Analytics.swift b/Riot/Modules/Analytics/Analytics.swift index b608c862e..60e1560b9 100644 --- a/Riot/Modules/Analytics/Analytics.swift +++ b/Riot/Modules/Analytics/Analytics.swift @@ -324,6 +324,11 @@ extension Analytics { viewRoomTrigger = .unknown capture(event: event) } + + func trackCryptoSDKEnabled() { + let event = AnalyticsEvent.CryptoSDKEnabled() + capture(event: event) + } } // MARK: - MXAnalyticsDelegate @@ -393,3 +398,14 @@ extension Analytics: MXAnalyticsDelegate { monitoringClient.trackNonFatalIssue(issue, details: details) } } + +/// iOS-specific analytics event triggered when users select the Crypto SDK labs option +/// +/// Due to this event being iOS only, and temporary during gradual rollout of Crypto SDK, +/// this event is not added into the shared analytics schema +extension AnalyticsEvent { + struct CryptoSDKEnabled: AnalyticsEventProtocol { + let eventName = "CryptoSDKEnabled" + let properties: [String: Any] = [:] + } +} diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index 93fffc9e8..ea8b57b22 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -2599,7 +2599,7 @@ ChangePasswordCoordinatorBridgePresenterDelegate> labelAndSwitchCell.mxkSwitch.on = isEnabled; [labelAndSwitchCell.mxkSwitch setEnabled:!isEnabled]; labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableCryptoSDKFeature:) forControlEvents:UIControlEventTouchUpInside]; + [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(enableCryptoSDKFeature:) forControlEvents:UIControlEventTouchUpInside]; cell = labelAndSwitchCell; } @@ -3375,16 +3375,14 @@ ChangePasswordCoordinatorBridgePresenterDelegate> RiotSettings.shared.enableVoiceBroadcast = sender.isOn; } -- (void)toggleEnableCryptoSDKFeature:(UISwitch *)sender +- (void)enableCryptoSDKFeature:(UISwitch *)sender { - BOOL isEnabled = sender.isOn; - MXWeakify(self); - [currentAlert dismissViewControllerAnimated:NO completion:nil]; UIAlertController *confirmationAlert = [UIAlertController alertControllerWithTitle:VectorL10n.settingsLabsEnableCryptoSdk message:VectorL10n.settingsLabsConfirmCryptoSdk preferredStyle:UIAlertControllerStyleAlert]; + MXWeakify(self); [confirmationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n cancel] style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { MXStrongifyAndReturnIfNil(self); self->currentAlert = nil; @@ -3393,9 +3391,10 @@ ChangePasswordCoordinatorBridgePresenterDelegate> }]]; [confirmationAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n continue] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { - MXStrongifyAndReturnIfNil(self); [CryptoSDKConfiguration.shared enable]; + [Analytics.shared trackCryptoSDKEnabled]; + [[AppDelegate theDelegate] reloadMatrixSessions:YES]; }]]; From 16b124abf38e5a22478f015ccf94216f7136109c Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 2 Feb 2023 18:05:50 +0000 Subject: [PATCH 8/9] changelog.d: Upgrade MatrixSDK version ([v0.25.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.25.0)). --- Config/AppVersion.xcconfig | 4 ++-- Podfile | 2 +- changelog.d/x-nolink-0.change | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelog.d/x-nolink-0.change diff --git a/Config/AppVersion.xcconfig b/Config/AppVersion.xcconfig index 210603b23..d203e4e63 100644 --- a/Config/AppVersion.xcconfig +++ b/Config/AppVersion.xcconfig @@ -15,5 +15,5 @@ // // Version -MARKETING_VERSION = 1.9.17 -CURRENT_PROJECT_VERSION = 1.9.17 +MARKETING_VERSION = 1.10.0 +CURRENT_PROJECT_VERSION = 1.10.0 diff --git a/Podfile b/Podfile index 35ba935b2..376ec852a 100644 --- a/Podfile +++ b/Podfile @@ -16,7 +16,7 @@ use_frameworks! # - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI # # Warning: our internal tooling depends on the name of this variable name, so be sure not to change it -$matrixSDKVersion = '= 0.24.8' +$matrixSDKVersion = '= 0.25.0' # $matrixSDKVersion = :local # $matrixSDKVersion = { :branch => 'develop'} # $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } } diff --git a/changelog.d/x-nolink-0.change b/changelog.d/x-nolink-0.change new file mode 100644 index 000000000..497d15527 --- /dev/null +++ b/changelog.d/x-nolink-0.change @@ -0,0 +1 @@ +Upgrade MatrixSDK version ([v0.25.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.25.0)). \ No newline at end of file From d8bb6fc23155dd9b8e53913c3a4acf7a718b2be4 Mon Sep 17 00:00:00 2001 From: Doug Date: Thu, 2 Feb 2023 18:05:51 +0000 Subject: [PATCH 9/9] version++ --- CHANGES.md | 12 ++++++++++++ changelog.d/pr-7310.change | 1 - changelog.d/pr-7319.change | 1 - changelog.d/pr-7323.change | 1 - changelog.d/pr-7332.change | 1 - changelog.d/pr-7333.change | 1 - changelog.d/x-nolink-0.change | 1 - 7 files changed, 12 insertions(+), 6 deletions(-) delete mode 100644 changelog.d/pr-7310.change delete mode 100644 changelog.d/pr-7319.change delete mode 100644 changelog.d/pr-7323.change delete mode 100644 changelog.d/pr-7332.change delete mode 100644 changelog.d/pr-7333.change delete mode 100644 changelog.d/x-nolink-0.change diff --git a/CHANGES.md b/CHANGES.md index 3484fcf48..c24df14b8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,15 @@ +## Changes in 1.10.0 (2023-02-02) + +🙌 Improvements + +- CryptoV2: Generate Crypto SDK store key ([#7310](https://github.com/vector-im/element-ios/pull/7310)) +- Backup: Display backup import progress ([#7319](https://github.com/vector-im/element-ios/pull/7319)) +- CryptoV2: Reset Crypto SDK on logout ([#7323](https://github.com/vector-im/element-ios/pull/7323)) +- CryptoV2: Refresh notification service on crypto change ([#7332](https://github.com/vector-im/element-ios/pull/7332)) +- CryptoV2: Enable Crypto SDK for production ([#7333](https://github.com/vector-im/element-ios/pull/7333)) +- Upgrade MatrixSDK version ([v0.25.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.25.0)). + + ## Changes in 1.9.17 (2023-01-26) 🙌 Improvements diff --git a/changelog.d/pr-7310.change b/changelog.d/pr-7310.change deleted file mode 100644 index 4ba5e9ee1..000000000 --- a/changelog.d/pr-7310.change +++ /dev/null @@ -1 +0,0 @@ -CryptoV2: Generate Crypto SDK store key diff --git a/changelog.d/pr-7319.change b/changelog.d/pr-7319.change deleted file mode 100644 index 187b315b5..000000000 --- a/changelog.d/pr-7319.change +++ /dev/null @@ -1 +0,0 @@ -Backup: Display backup import progress diff --git a/changelog.d/pr-7323.change b/changelog.d/pr-7323.change deleted file mode 100644 index 308cf2813..000000000 --- a/changelog.d/pr-7323.change +++ /dev/null @@ -1 +0,0 @@ -CryptoV2: Reset Crypto SDK on logout diff --git a/changelog.d/pr-7332.change b/changelog.d/pr-7332.change deleted file mode 100644 index 94a5bdc89..000000000 --- a/changelog.d/pr-7332.change +++ /dev/null @@ -1 +0,0 @@ -CryptoV2: Refresh notification service on crypto change diff --git a/changelog.d/pr-7333.change b/changelog.d/pr-7333.change deleted file mode 100644 index fbf81e873..000000000 --- a/changelog.d/pr-7333.change +++ /dev/null @@ -1 +0,0 @@ -CryptoV2: Enable Crypto SDK for production diff --git a/changelog.d/x-nolink-0.change b/changelog.d/x-nolink-0.change deleted file mode 100644 index 497d15527..000000000 --- a/changelog.d/x-nolink-0.change +++ /dev/null @@ -1 +0,0 @@ -Upgrade MatrixSDK version ([v0.25.0](https://github.com/matrix-org/matrix-ios-sdk/releases/tag/v0.25.0)). \ No newline at end of file