mirror of https://github.com/vector-im/riot-web
Merge pull request #4057 from matrix-org/foldleft/12221-secret-storage
Fixed bug where key reset didn't always return the right keypull/21833/head
commit
466d4a3e51
|
@ -225,13 +225,21 @@ export default class CreateSecretStorageDialog extends React.PureComponent {
|
|||
const { force } = this.props;
|
||||
|
||||
try {
|
||||
await cli.bootstrapSecretStorage({
|
||||
setupNewSecretStorage: force,
|
||||
authUploadDeviceSigningKeys: this._doBootstrapUIAuth,
|
||||
createSecretStorageKey: async () => this._keyInfo,
|
||||
keyBackupInfo: this.state.backupInfo,
|
||||
setupNewKeyBackup: force || !this.state.backupInfo && this.state.useKeyBackup,
|
||||
});
|
||||
if (force) {
|
||||
await cli.bootstrapSecretStorage({
|
||||
authUploadDeviceSigningKeys: this._doBootstrapUIAuth,
|
||||
createSecretStorageKey: async () => this._keyInfo,
|
||||
setupNewKeyBackup: true,
|
||||
setupNewSecretStorage: true,
|
||||
});
|
||||
} else {
|
||||
await cli.bootstrapSecretStorage({
|
||||
authUploadDeviceSigningKeys: this._doBootstrapUIAuth,
|
||||
createSecretStorageKey: async () => this._keyInfo,
|
||||
keyBackupInfo: this.state.backupInfo,
|
||||
setupNewKeyBackup: !this.state.backupInfo && this.state.useKeyBackup,
|
||||
});
|
||||
}
|
||||
this.setState({
|
||||
phase: PHASE_DONE,
|
||||
});
|
||||
|
|
|
@ -103,7 +103,6 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
|
||||
onDestroyStorage = (act) => {
|
||||
if (!act) return;
|
||||
console.log("Destroy secret storage:", act);
|
||||
this._bootstrapSecureSecretStorage(true);
|
||||
}
|
||||
|
||||
|
@ -157,13 +156,13 @@ export default class CrossSigningPanel extends React.PureComponent {
|
|||
{_t("Bootstrap cross-signing and secret storage")}
|
||||
</AccessibleButton>
|
||||
</div>;
|
||||
} /*else { // TODO https://github.com/vector-im/riot-web/issues/12221
|
||||
} else {
|
||||
bootstrapButton = <div className="mx_CrossSigningPanel_buttonRow">
|
||||
<AccessibleButton kind="danger" onClick={this._destroySecureSecretStorage}>
|
||||
{_t("Reset cross-signing and secret storage")}
|
||||
</AccessibleButton>
|
||||
</div>;
|
||||
}*/
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
|
@ -565,6 +565,7 @@
|
|||
"Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.": "Your account has a cross-signing identity in secret storage, but it is not yet trusted by this session.",
|
||||
"Cross-signing and secret storage are not yet set up.": "Cross-signing and secret storage are not yet set up.",
|
||||
"Bootstrap cross-signing and secret storage": "Bootstrap cross-signing and secret storage",
|
||||
"Reset cross-signing and secret storage": "Reset cross-signing and secret storage",
|
||||
"Cross-signing public keys:": "Cross-signing public keys:",
|
||||
"in memory": "in memory",
|
||||
"not found": "not found",
|
||||
|
|
Loading…
Reference in New Issue