Merge pull request #4359 from matrix-org/jryans/backup-key-cache-format
Add debug status for cached backup key format
This commit is contained in:
commit
a5f6a07ed6
2 changed files with 21 additions and 2 deletions
|
@ -81,7 +81,9 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage);
|
const crossSigningPrivateKeysInStorage = await crossSigning.isStoredInSecretStorage(secretStorage);
|
||||||
const selfSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("self_signing"));
|
const selfSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("self_signing"));
|
||||||
const userSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("user_signing"));
|
const userSigningPrivateKeyCached = !!(pkCache && await pkCache.getCrossSigningKeyCache("user_signing"));
|
||||||
const sessionBackupKeyCached = !!(await cli._crypto.getSessionBackupPrivateKey());
|
const sessionBackupKeyFromCache = await cli._crypto.getSessionBackupPrivateKey();
|
||||||
|
const sessionBackupKeyCached = !!(sessionBackupKeyFromCache);
|
||||||
|
const sessionBackupKeyWellFormed = sessionBackupKeyFromCache instanceof Uint8Array;
|
||||||
const secretStorageKeyInAccount = await secretStorage.hasKey();
|
const secretStorageKeyInAccount = await secretStorage.hasKey();
|
||||||
const homeserverSupportsCrossSigning =
|
const homeserverSupportsCrossSigning =
|
||||||
await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing");
|
await cli.doesServerSupportUnstableFeature("org.matrix.e2e_cross_signing");
|
||||||
|
@ -94,6 +96,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
selfSigningPrivateKeyCached,
|
selfSigningPrivateKeyCached,
|
||||||
userSigningPrivateKeyCached,
|
userSigningPrivateKeyCached,
|
||||||
sessionBackupKeyCached,
|
sessionBackupKeyCached,
|
||||||
|
sessionBackupKeyWellFormed,
|
||||||
secretStorageKeyInAccount,
|
secretStorageKeyInAccount,
|
||||||
homeserverSupportsCrossSigning,
|
homeserverSupportsCrossSigning,
|
||||||
crossSigningReady,
|
crossSigningReady,
|
||||||
|
@ -143,6 +146,7 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
selfSigningPrivateKeyCached,
|
selfSigningPrivateKeyCached,
|
||||||
userSigningPrivateKeyCached,
|
userSigningPrivateKeyCached,
|
||||||
sessionBackupKeyCached,
|
sessionBackupKeyCached,
|
||||||
|
sessionBackupKeyWellFormed,
|
||||||
secretStorageKeyInAccount,
|
secretStorageKeyInAccount,
|
||||||
homeserverSupportsCrossSigning,
|
homeserverSupportsCrossSigning,
|
||||||
crossSigningReady,
|
crossSigningReady,
|
||||||
|
@ -208,6 +212,16 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let sessionBackupKeyWellFormedText = "";
|
||||||
|
if (sessionBackupKeyCached) {
|
||||||
|
sessionBackupKeyWellFormedText = ", ";
|
||||||
|
if (sessionBackupKeyWellFormed) {
|
||||||
|
sessionBackupKeyWellFormedText += _t("well formed");
|
||||||
|
} else {
|
||||||
|
sessionBackupKeyWellFormedText += _t("unexpected type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{summarisedStatus}
|
{summarisedStatus}
|
||||||
|
@ -232,7 +246,10 @@ export default class CrossSigningPanel extends React.PureComponent {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{_t("Session backup key:")}</td>
|
<td>{_t("Session backup key:")}</td>
|
||||||
<td>{sessionBackupKeyCached ? _t("cached locally") : _t("not found locally")}</td>
|
<td>
|
||||||
|
{sessionBackupKeyCached ? _t("cached locally") : _t("not found locally")}
|
||||||
|
{sessionBackupKeyWellFormedText}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>{_t("Secret storage public key:")}</td>
|
<td>{_t("Secret storage public key:")}</td>
|
||||||
|
|
|
@ -592,6 +592,8 @@
|
||||||
"Cross-signing and secret storage are not yet set up.": "Cross-signing and secret storage are not yet set up.",
|
"Cross-signing and secret storage are not yet set up.": "Cross-signing and secret storage are not yet set up.",
|
||||||
"Reset cross-signing and secret storage": "Reset cross-signing and secret storage",
|
"Reset cross-signing and secret storage": "Reset cross-signing and secret storage",
|
||||||
"Bootstrap cross-signing and secret storage": "Bootstrap cross-signing and secret storage",
|
"Bootstrap cross-signing and secret storage": "Bootstrap cross-signing and secret storage",
|
||||||
|
"well formed": "well formed",
|
||||||
|
"unexpected type": "unexpected type",
|
||||||
"Cross-signing public keys:": "Cross-signing public keys:",
|
"Cross-signing public keys:": "Cross-signing public keys:",
|
||||||
"in memory": "in memory",
|
"in memory": "in memory",
|
||||||
"not found": "not found",
|
"not found": "not found",
|
||||||
|
|
Loading…
Reference in a new issue