diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index 1c6e31042..1a36efb70 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -356,7 +356,7 @@ class SSSSCryptoCallbacks { public async getSecretStorageKey( { keys }: { keys: Record }, name: string, - ): Promise<[string, Uint8Array]|void> { + ): Promise<[string, Uint8Array]|null> { for (const keyId of Object.keys(keys)) { const privateKey = this.privateKeys.get(keyId); if (privateKey) { @@ -374,6 +374,7 @@ class SSSSCryptoCallbacks { } return result; } + return null; } public addPrivateKey(keyId: string, keyInfo: ISecretStorageKeyInfo, privKey: Uint8Array): void {