aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead/ssh2
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2007-11-21 22:31:46 +0000
committerKenny Root <kenny@the-b.org>2007-11-21 22:31:46 +0000
commitb4261695b2687ed43821ada65abe14d87604ba74 (patch)
tree417defc40c378ed880d16324a54c3126cf9a2429 /lib/src/main/java/com/trilead/ssh2
parentad9b24675b3b582ea4e6bbe6ee1fce9dee37f1f3 (diff)
downloadsshlib-b4261695b2687ed43821ada65abe14d87604ba74.tar.gz
sshlib-b4261695b2687ed43821ada65abe14d87604ba74.tar.bz2
sshlib-b4261695b2687ed43821ada65abe14d87604ba74.zip
Added preferences, touch entropy, fixes to SoftFont.
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java b/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java
index 894a31f..99d62ca 100644
--- a/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java
+++ b/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java
@@ -161,6 +161,14 @@ public class AuthenticationManager implements MessageHandler
public boolean authenticatePublicKey(String user, char[] PEMPrivateKey, String password, SecureRandom rnd)
throws IOException
{
+ Object key = PEMDecoder.decode(PEMPrivateKey, password);
+
+ return authenticatePublicKey(user, key, rnd);
+ }
+
+ public boolean authenticatePublicKey(String user, Object key, SecureRandom rnd)
+ throws IOException
+ {
try
{
initialize(user);
@@ -168,8 +176,6 @@ public class AuthenticationManager implements MessageHandler
if (methodPossible("publickey") == false)
throw new IOException("Authentication method publickey not supported by the server at this stage.");
- Object key = PEMDecoder.decode(PEMPrivateKey, password);
-
if (key instanceof DSAPrivateKey)
{
DSAPrivateKey pk = (DSAPrivateKey) key;