diff --git a/src/org/jgroups/protocols/ASYM_ENCRYPT.java b/src/org/jgroups/protocols/ASYM_ENCRYPT.java index 6e4601f225..a1128a0030 100644 --- a/src/org/jgroups/protocols/ASYM_ENCRYPT.java +++ b/src/org/jgroups/protocols/ASYM_ENCRYPT.java @@ -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();