Fix getting secrets encoded with passthrough keys

This commit is contained in:
David Baker
2020-02-01 17:29:08 +00:00
parent 620118af5f
commit 6d13457172
+6 -2
View File
@@ -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;