1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Fix check for private keys

This check for new keys was always true, instead of checking whether something
was added.
This commit is contained in:
J. Ryan Stinnett
2019-12-11 14:56:09 +00:00
parent ab4d9ae4bc
commit a626b44bbe

View File

@@ -400,7 +400,7 @@ Crypto.prototype.bootstrapSecretStorage = async function({
// own key first.
// XXX: We need to think about how to re-do these steps if they fail.
// See also https://github.com/vector-im/riot-web/issues/11635
if (crossSigningPrivateKeys) {
if (Object.keys(crossSigningPrivateKeys).length) {
logger.log("Storing cross-signing private keys in secret storage");
// SSSS expects its keys to be signed by cross-signing master key.
// Since we have just reset cross-signing keys, we need to re-sign the