mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Return null in derivePublicKey if privateKey is null (#10882)
This commit is contained in:
@@ -945,6 +945,10 @@ export class CryptoService implements CryptoServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async derivePublicKey(privateKey: UserPrivateKey) {
|
private async derivePublicKey(privateKey: UserPrivateKey) {
|
||||||
|
if (privateKey == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return (await this.cryptoFunctionService.rsaExtractPublicKey(privateKey)) as UserPublicKey;
|
return (await this.cryptoFunctionService.rsaExtractPublicKey(privateKey)) as UserPublicKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user