From 96c8c2b9c31ef5b64fe2ad3b009696030c8726f5 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 4 Dec 2019 15:16:38 +0000 Subject: [PATCH] Test for cross-signing private key as well as public --- src/crypto/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/crypto/index.js b/src/crypto/index.js index ae2c4633e..183b7fa85 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -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)) {