From a2c10a791360de31e9f1206ef959614ef15e0d9b Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Fri, 13 Aug 2021 15:28:01 +0200 Subject: [PATCH 1/3] SSSSCryptoCallbacks.getSecretStorageKey: Test if delegateCryptoCallbacks has getSecretStorageKey --- src/crypto/EncryptionSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index faa4bd2e8..42e3c0b01 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -365,7 +365,7 @@ class SSSSCryptoCallbacks { } // if we don't have the key cached yet, ask // for it to the general crypto callbacks and cache it - if (this.delegateCryptoCallbacks) { + if (this.delegateCryptoCallbacks && this.delegateCryptoCallbacks.getSecretStorageKey) { const result = await this.delegateCryptoCallbacks. getSecretStorageKey({ keys }, name); if (result) { From be980f4bc900d3f5929c27c1324133759a470601 Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Fri, 13 Aug 2021 15:38:22 +0200 Subject: [PATCH 2/3] Update src/crypto/EncryptionSetup.ts --- src/crypto/EncryptionSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index 42e3c0b01..4227f638e 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -365,7 +365,7 @@ class SSSSCryptoCallbacks { } // if we don't have the key cached yet, ask // for it to the general crypto callbacks and cache it - if (this.delegateCryptoCallbacks && this.delegateCryptoCallbacks.getSecretStorageKey) { + if (this.delegateCryptoCallbacks?.getSecretStorageKey) { const result = await this.delegateCryptoCallbacks. getSecretStorageKey({ keys }, name); if (result) { From 3c7cdb1da8ba6857ec49664b08fe4bc16428172b Mon Sep 17 00:00:00 2001 From: Christian Paul Date: Mon, 16 Aug 2021 10:36:21 +0200 Subject: [PATCH 3/3] Update src/crypto/EncryptionSetup.ts --- src/crypto/EncryptionSetup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index 4227f638e..f6c144bf6 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -365,7 +365,7 @@ class SSSSCryptoCallbacks { } // if we don't have the key cached yet, ask // for it to the general crypto callbacks and cache it - if (this.delegateCryptoCallbacks?.getSecretStorageKey) { + if (this?.delegateCryptoCallbacks?.getSecretStorageKey) { const result = await this.delegateCryptoCallbacks. getSecretStorageKey({ keys }, name); if (result) {