Skip to content

Commit

Permalink
Merge pull request #467 from zakharovsergey1000/master
Browse files Browse the repository at this point in the history
Synchronize not thread safe java.security.KeyPairGenerator.generateKe…
  • Loading branch information
tomaswolf authored Apr 2, 2024
2 parents de46a15 + a90aa9f commit a6dad81
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ public Digest createDigest() {
}

public KeyPair generateKeyPair() {
return keyPairGenerator.generateKeyPair();
synchronized (this) {
return keyPairGenerator.generateKeyPair();
}
}

public byte[] encode(PublicKey key) throws InvalidKeyException {
Expand Down

0 comments on commit a6dad81

Please sign in to comment.