This commit is contained in:
David Baker
2020-04-16 20:18:27 +01:00
parent 761892d6b1
commit 149f59e9be
+5 -1
View File
@@ -579,7 +579,11 @@ Crypto.prototype.bootstrapSecretStorage = async function({
await resetCrossSigning();
if (setupNewSecretStorage || !oldKeyInfo || oldKeyInfo.algorithm !== SECRET_STORAGE_ALGORITHM_V1_AES) {
if (
setupNewSecretStorage ||
!oldKeyInfo ||
oldKeyInfo.algorithm !== SECRET_STORAGE_ALGORITHM_V1_AES
) {
// if we already have a usable default SSSS key and aren't resetting SSSS just use it.
// otherwise, create a new one
// Note: we leave the old SSSS key in place: there could be other secrets using it, in theory.