mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 16:45:22 +00:00
Make panic wipe deterministic and device-bound (#1431)
* Make panic wipe deterministic and device-bound * Scope install markers to iOS * Harden panic recovery and service shutdown * Invalidate queued BLE ingress during panic * Harden panic keychain and media cleanup --------- Co-authored-by: jack <jackjackbits@users.noreply.github.com> Co-authored-by: jack <jack@deck.local>
This commit is contained in:
@@ -18,6 +18,8 @@ final class MockKeychain: KeychainManagerProtocol {
|
||||
var simulatedReadError: KeychainReadResult?
|
||||
var simulatedSaveError: KeychainSaveResult?
|
||||
var simulatedGenericReadError: KeychainReadResult?
|
||||
var simulatedDeleteAllResult = true
|
||||
private(set) var deleteAllCallCount = 0
|
||||
|
||||
func saveIdentityKey(_ keyData: Data, forKey key: String) -> Bool {
|
||||
storage[key] = keyData
|
||||
@@ -34,6 +36,8 @@ final class MockKeychain: KeychainManagerProtocol {
|
||||
}
|
||||
|
||||
func deleteAllKeychainData() -> Bool {
|
||||
deleteAllCallCount += 1
|
||||
guard simulatedDeleteAllResult else { return false }
|
||||
storage.removeAll()
|
||||
serviceStorage.removeAll()
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user