Remove feature_dehydration (#138)

* Remove feature_dehydration

* Remove remaining old dehydration

* Update test
This commit is contained in:
Florian Duros 2024-10-14 18:10:41 +02:00 committed by GitHub
parent 91e84f7951
commit 63986f8c42
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 3 additions and 76 deletions

View file

@ -16,7 +16,6 @@ import { MatrixClientPeg } from "./MatrixClientPeg";
import { _t } from "./languageHandler";
import { isSecureBackupRequired } from "./utils/WellKnownUtils";
import AccessSecretStorageDialog, { KeyParams } from "./components/views/dialogs/security/AccessSecretStorageDialog";
import SettingsStore from "./settings/SettingsStore";
import { ModuleRunner } from "./modules/ModuleRunner";
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog";
@ -276,20 +275,6 @@ async function doAccessSecretStorage(func: () => Promise<void>, forceReset: bool
});
logger.debug("accessSecretStorage: bootstrapSecretStorage");
await crypto.bootstrapSecretStorage({});
const keyId = Object.keys(secretStorageKeys)[0];
if (keyId && SettingsStore.getValue("feature_dehydration")) {
let dehydrationKeyInfo = {};
if (secretStorageKeyInfo[keyId] && secretStorageKeyInfo[keyId].passphrase) {
dehydrationKeyInfo = { passphrase: secretStorageKeyInfo[keyId].passphrase };
}
logger.log("accessSecretStorage: Setting dehydration key");
await cli.setDehydrationKey(secretStorageKeys[keyId], dehydrationKeyInfo, "Backup device");
} else if (!keyId) {
logger.warn("accessSecretStorage: Not setting dehydration key: no SSSS key found");
} else {
logger.log("accessSecretStorage: Not setting dehydration key: feature disabled");
}
}
logger.debug("accessSecretStorage: 4S now ready");