From 6d13457172bbadaba5e2a9fa4884e79bbef02f7f Mon Sep 17 00:00:00 2001 From: David Baker Date: Sat, 1 Feb 2020 17:29:08 +0000 Subject: [PATCH] Fix getting secrets encoded with passthrough keys --- src/crypto/SecretStorage.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/crypto/SecretStorage.js b/src/crypto/SecretStorage.js index ffd900475..88006bc0c 100644 --- a/src/crypto/SecretStorage.js +++ b/src/crypto/SecretStorage.js @@ -318,8 +318,12 @@ export class SecretStorage extends EventEmitter { const encInfo = secretInfo.encrypted[keyId]; switch (keyInfo.algorithm) { case SECRET_STORAGE_ALGORITHM_V1: - if (keyInfo.pubkey && encInfo.ciphertext && encInfo.mac - && encInfo.ephemeral) { + if ( + keyInfo.pubkey && ( + (encInfo.ciphertext && encInfo.mac && encInfo.ephemeral) || + encInfo.passthrough + ) + ) { keys[keyId] = keyInfo; } break;