Add cross-signing feature flag

Fixes https://github.com/vector-im/riot-web/issues/11407
This commit is contained in:
J. Ryan Stinnett
2019-11-18 16:06:00 +00:00
parent 854b5a7af5
commit 50cccd3212
3 changed files with 17 additions and 0 deletions
+10
View File
@@ -220,6 +220,16 @@ class MatrixClientPeg {
identityServer: new IdentityAuthClient(),
};
if (SettingsStore.isFeatureEnabled("feature_cross_signing")) {
// TODO: Cross-signing keys are temporarily in memory only. A
// separate task in the cross-signing project will build from here.
const keys = [];
opts.cryptoCallbacks = {
getCrossSigningKey: k => keys[k],
saveCrossSigningKeys: newKeys => Object.assign(keys, newKeys),
};
}
this.matrixClient = createMatrixClient(opts);
// we're going to add eventlisteners for each matrix event tile, so the