From a626b44bbeaa7588318bd299f88728d2b1241601 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 11 Dec 2019 14:56:09 +0000 Subject: [PATCH] Fix check for private keys This check for new keys was always true, instead of checking whether something was added. --- src/crypto/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/index.js b/src/crypto/index.js index 47cb1c262..f246299c7 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -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