GUACAMOLE-362: More useful error messages for exceptions in PrivateKey property.

This commit is contained in:
Nick Couchman authored and Nick Couchman committed 2017-10-27 13:05:13 -04:00
1 parent 6f04573b84
commit 3ce0980efc
1 file changed
+2 -2
@@ -70,10 +70,10 @@ public abstract class PrivateKeyGuacamoleProperty implements GuacamoleProperty<P
throw new GuacamoleServerException("Could not read in the specified key file.", e);
}
catch (NoSuchAlgorithmException e) {
throw new GuacamoleServerException("Specified algorithm does not exist.", e);
throw new GuacamoleServerException("Key is not in expected RSA algorithm.", e);
}
catch (InvalidKeySpecException e) {
throw new GuacamoleServerException("Invalid KeySpec initialization.", e);
throw new GuacamoleServerException("KeyS is not in expected PKCS8 encoding.", e);
}
}