diff --git a/src/client.js b/src/client.js index e89ea5035..1ba3c4604 100644 --- a/src/client.js +++ b/src/client.js @@ -1506,7 +1506,7 @@ MatrixClient.prototype.createKeyBackupVersion = async function(info) { await this._crypto._signObject(data.auth_data); if ( - this._cryptoCallbacks.getSecretStorageKey && + this._cryptoCallbacks.getCrossSigningKey && this._crypto._crossSigningInfo.getId() ) { // now also sign the auth data with the cross-signing master key diff --git a/src/crypto/index.js b/src/crypto/index.js index fa547c395..b2c4001c0 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -218,7 +218,7 @@ export default function Crypto(baseApis, sessionStore, userId, deviceId, ); // Assuming no app-supplied callback, default to getting from SSSS. - if (!cryptoCallbacks.getCrossSigningKey) { + if (!cryptoCallbacks.getCrossSigningKey && cryptoCallbacks.getSecretStorageKey) { cryptoCallbacks.getCrossSigningKey = async (type) => { return CrossSigningInfo.getFromSecretStorage(type, this._secretStorage); };