From ccb3283fd3e59c39ee67db79dbde4f082f688e73 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 26 Mar 2020 18:50:31 +0000 Subject: [PATCH] Show whether backup key is cached in cross signing debug panel --- src/components/views/settings/CrossSigningPanel.js | 8 ++++++++ src/i18n/strings/en_EN.json | 1 + 2 files changed, 9 insertions(+) diff --git a/src/components/views/settings/CrossSigningPanel.js b/src/components/views/settings/CrossSigningPanel.js index b960434ca1c..1242c35df85 100644 --- a/src/components/views/settings/CrossSigningPanel.js +++ b/src/components/views/settings/CrossSigningPanel.js @@ -34,6 +34,7 @@ export default class CrossSigningPanel extends React.PureComponent { crossSigningPrivateKeysInStorage: false, selfSigningPrivateKeyCached: false, userSigningPrivateKeyCached: false, + sessionBackupKeyCached: false, secretStorageKeyInAccount: false, secretStorageKeyNeedsUpgrade: null, }; @@ -80,6 +81,7 @@ export default class CrossSigningPanel extends React.PureComponent { const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage); const selfSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("self_signing")); const userSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("user_signing")); + const sessionBackupKeyCached = !!(await cli._crypto.getSessionBackupPrivateKey()); const secretStorageKeyInAccount = await secretStorage.hasKey(); const homeserverSupportsCrossSigning = await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing"); @@ -91,6 +93,7 @@ export default class CrossSigningPanel extends React.PureComponent { crossSigningPrivateKeysInStorage, selfSigningPrivateKeyCached, userSigningPrivateKeyCached, + sessionBackupKeyCached, secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, @@ -139,6 +142,7 @@ export default class CrossSigningPanel extends React.PureComponent { crossSigningPrivateKeysInStorage, selfSigningPrivateKeyCached, userSigningPrivateKeyCached, + sessionBackupKeyCached, secretStorageKeyInAccount, homeserverSupportsCrossSigning, crossSigningReady, @@ -226,6 +230,10 @@ export default class CrossSigningPanel extends React.PureComponent { {_t("User signing private key:")} {userSigningPrivateKeyCached ? _t("cached locally") : _t("not found locally")} + + {_t("Session backup key:")} + {sessionBackupKeyCached ? _t("cached locally") : _t("not found locally")} + {_t("Secret storage public key:")} {secretStorageKeyInAccount ? _t("in account data") : _t("not found")} diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index c79717e352a..c1f8df13719 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -588,6 +588,7 @@ "cached locally": "cached locally", "not found locally": "not found locally", "User signing private key:": "User signing private key:", + "Session backup key:": "Session backup key:", "Secret storage public key:": "Secret storage public key:", "in account data": "in account data", "Homeserver feature support:": "Homeserver feature support:",