aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/trilead
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
commit1c4ff63a55947db1cd730fb40856185e22bb47c6 (patch)
treeb01e0369ed3804d923b3228b075547d3e483855a /src/com/trilead
parentd6764b7763e7857273b65048b4eb37a3c65efade (diff)
downloadconnectbot-1c4ff63a55947db1cd730fb40856185e22bb47c6.tar.gz
connectbot-1c4ff63a55947db1cd730fb40856185e22bb47c6.tar.bz2
connectbot-1c4ff63a55947db1cd730fb40856185e22bb47c6.zip
Added preferences, touch entropy, fixes to SoftFont.
Diffstat (limited to 'src/com/trilead')
-rw-r--r--src/com/trilead/ssh2/auth/AuthenticationManager.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/trilead/ssh2/auth/AuthenticationManager.java b/src/com/trilead/ssh2/auth/AuthenticationManager.java
index 894a31f..99d62ca 100644
--- a/src/com/trilead/ssh2/auth/AuthenticationManager.java
+++ b/src/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;