Skip to content

Commit

Permalink
[#368] Avoid NPE if the PrivateKey cannot be loaded. (#666)
Browse files Browse the repository at this point in the history
Related to 345a9e1.
  • Loading branch information
sp193 authored Oct 16, 2023
1 parent 18ff79a commit 60d0fca
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ public KeyPair getKeyPair(String certAlias) {
else
{
privateKey = getPrivateKey(certAlias);
mapKey.putIfAbsent(certAlias, privateKey);
if (privateKey != null)
mapKey.putIfAbsent(certAlias, privateKey);
}

if (publicKey != null && privateKey != null) {
Expand Down

0 comments on commit 60d0fca

Please sign in to comment.