Return null in derivePublicKey if privateKey is null (#10882)

This commit is contained in:
Bernd Schoolmann 2024-09-04 17:16:57 +02:00 committed by GitHub
parent 86fab07a37
commit 192fd885d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -945,6 +945,10 @@ export class CryptoService implements CryptoServiceAbstraction {
}
private async derivePublicKey(privateKey: UserPrivateKey) {
if (privateKey == null) {
return null;
}
return (await this.cryptoFunctionService.rsaExtractPublicKey(privateKey)) as UserPublicKey;
}