You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
SSSSCryptoCallbacks.getSecretStorageKey: Return null, if no key found
This commit is contained in:
@@ -356,7 +356,7 @@ class SSSSCryptoCallbacks {
|
||||
public async getSecretStorageKey(
|
||||
{ keys }: { keys: Record<string, ISecretStorageKeyInfo> },
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user