Show master key cache status in Settings
This commit is contained in:
parent
060f2cf54f
commit
4c1956a3c2
2 changed files with 10 additions and 1 deletions
|
@ -32,6 +32,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
error: null,
|
||||
crossSigningPublicKeysOnDevice: false,
|
||||
crossSigningPrivateKeysInStorage: false,
|
||||
masterPrivateKeyCached: false,
|
||||
selfSigningPrivateKeyCached: false,
|
||||
userSigningPrivateKeyCached: false,
|
||||
sessionBackupKeyCached: false,
|
||||
|
@ -78,6 +79,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
const secretStorage = cli._crypto._secretStorage;
|
||||
const crossSigningPublicKeysOnDevice = crossSigning.getId();
|
||||
const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage);
|
||||
const masterPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("master"));
|
||||
const selfSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("self_signing"));
|
||||
const userSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("user_signing"));
|
||||
const sessionBackupKeyFromCache = await cli._crypto.getSessionBackupPrivateKey();
|
||||
|
@ -91,6 +93,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
this.setState({
|
||||
crossSigningPublicKeysOnDevice,
|
||||
crossSigningPrivateKeysInStorage,
|
||||
masterPrivateKeyCached,
|
||||
selfSigningPrivateKeyCached,
|
||||
userSigningPrivateKeyCached,
|
||||
sessionBackupKeyCached,
|
||||
|
@ -140,6 +143,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
error,
|
||||
crossSigningPublicKeysOnDevice,
|
||||
crossSigningPrivateKeysInStorage,
|
||||
masterPrivateKeyCached,
|
||||
selfSigningPrivateKeyCached,
|
||||
userSigningPrivateKeyCached,
|
||||
sessionBackupKeyCached,
|
||||
|
@ -235,6 +239,10 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
<td>{_t("Cross-signing private keys:")}</td>
|
||||
<td>{crossSigningPrivateKeysInStorage ? _t("in secret storage") : _t("not found")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{_t("Master private key:")}</td>
|
||||
<td>{masterPrivateKeyCached ? _t("cached locally") : _t("not found locally")}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{_t("Self signing private key:")}</td>
|
||||
<td>{selfSigningPrivateKeyCached ? _t("cached locally") : _t("not found locally")}</td>
|
||||
|
|
|
@ -653,9 +653,10 @@
|
|||
"not found": "not found",
|
||||
"Cross-signing private keys:": "Cross-signing private keys:",
|
||||
"in secret storage": "in secret storage",
|
||||
"Self signing private key:": "Self signing private key:",
|
||||
"Master private key:": "Master private key:",
|
||||
"cached locally": "cached locally",
|
||||
"not found locally": "not found locally",
|
||||
"Self signing private key:": "Self signing private key:",
|
||||
"User signing private key:": "User signing private key:",
|
||||
"Session backup key:": "Session backup key:",
|
||||
"Secret storage public key:": "Secret storage public key:",
|
||||
|
|
Loading…
Reference in a new issue