GUACAMOLE-362: More useful error messages for exceptions in PrivateKey property.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/3ce0980e Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/3ce0980e Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/3ce0980e Branch: refs/heads/master Commit: 3ce0980efcb170a0ca96373ba842466dc3aa1445 Parents: 6f04573 Author: Nick Couchman <[email protected]> Authored: Wed Sep 27 10:28:34 2017 -0400 Committer: Nick Couchman <[email protected]> Committed: Fri Oct 27 13:05:13 2017 -0400 ---------------------------------------------------------------------- .../apache/guacamole/properties/PrivateKeyGuacamoleProperty.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/3ce0980e/guacamole-ext/src/main/java/org/apache/guacamole/properties/PrivateKeyGuacamoleProperty.java ---------------------------------------------------------------------- diff --git a/guacamole-ext/src/main/java/org/apache/guacamole/properties/PrivateKeyGuacamoleProperty.java b/guacamole-ext/src/main/java/org/apache/guacamole/properties/PrivateKeyGuacamoleProperty.java index 904a4d1..570b776 100644 --- a/guacamole-ext/src/main/java/org/apache/guacamole/properties/PrivateKeyGuacamoleProperty.java +++ b/guacamole-ext/src/main/java/org/apache/guacamole/properties/PrivateKeyGuacamoleProperty.java @@ -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); } }
