1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Test for cross-signing private key as well as public

This commit is contained in:
J. Ryan Stinnett
2019-12-04 15:16:38 +00:00
parent 145cdf6985
commit 96c8c2b9c3

View File

@@ -346,9 +346,12 @@ Crypto.prototype.bootstrapSecretStorage = async function({
// to verify the signature on the SSSS default key when adding secrets, so we
// effectively need it for both reading and writing secrets.
let crossSigningKeysReset = false;
if (!this._crossSigningInfo.getId()) {
if (
!this._crossSigningInfo.getId() ||
!await this._baseApis._cryptoCallbacks.getCrossSigningKey("master")
) {
logger.log(
"Cross-signing public keys not found on device, " +
"Cross-signing public and/or private keys not found on device, " +
"checking secret storage for private keys",
);
if (this._crossSigningInfo.isStoredInSecretStorage(this._secretStorage)) {