Skip to content

Commit

Permalink
- ASYM_ENCRYPT checks in init() if the secret key enables encoding (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Oct 12, 2023
1 parent d7e121a commit 1359b96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/jgroups/protocols/ASYM_ENCRYPT.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ public boolean isKeyServer() {
}

public void init() throws Exception {
SecretKey k=createSecretKey();
byte[] encoded=k.getEncoded();
if(encoded == null)
throw new IllegalArgumentException(String.format("secret key %s/%s does not support encoding (FIPS enabled?)",
k.getAlgorithm(), k.getFormat()));
send_group_keys=false;
initKeyPair();
super.init();
Expand Down

0 comments on commit 1359b96

Please sign in to comment.