diff options
Diffstat (limited to 'lib/src/main/java/com')
3 files changed, 8 insertions, 6 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 99d62ca..43c226a 100644 --- a/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java +++ b/lib/src/main/java/com/trilead/ssh2/auth/AuthenticationManager.java @@ -233,7 +233,9 @@ public class AuthenticationManager implements MessageHandler PacketUserauthRequestPublicKey ua = new PacketUserauthRequestPublicKey("ssh-connection", user,
"ssh-rsa", pk_enc, rsa_sig_enc);
+
tm.sendMessage(ua.getPayload());
+
}
else
{
@@ -241,7 +243,6 @@ public class AuthenticationManager implements MessageHandler }
byte[] ar = getNextMessage();
-
if (ar[0] == Packets.SSH_MSG_USERAUTH_SUCCESS)
{
authenticated = true;
@@ -264,6 +265,7 @@ public class AuthenticationManager implements MessageHandler }
catch (IOException e)
{
+e.printStackTrace();
tm.close(e, false);
throw (IOException) new IOException("Publickey authentication failed.").initCause(e);
}
diff --git a/lib/src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java b/lib/src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java index ac1b842..7d0a015 100644 --- a/lib/src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java +++ b/lib/src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java @@ -23,8 +23,8 @@ import com.trilead.ssh2.signature.RSAPrivateKey; */
public class PEMDecoder
{
- private static final int PEM_RSA_PRIVATE_KEY = 1;
- private static final int PEM_DSA_PRIVATE_KEY = 2;
+ public static final int PEM_RSA_PRIVATE_KEY = 1;
+ public static final int PEM_DSA_PRIVATE_KEY = 2;
private static final int hexToInt(char c)
{
@@ -120,7 +120,7 @@ public class PEMDecoder return tmp;
}
- private static final PEMStructure parsePEM(char[] pem) throws IOException
+ public static final PEMStructure parsePEM(char[] pem) throws IOException
{
PEMStructure ps = new PEMStructure();
diff --git a/lib/src/main/java/com/trilead/ssh2/crypto/PEMStructure.java b/lib/src/main/java/com/trilead/ssh2/crypto/PEMStructure.java index 3bb4b5a..6b657e8 100644 --- a/lib/src/main/java/com/trilead/ssh2/crypto/PEMStructure.java +++ b/lib/src/main/java/com/trilead/ssh2/crypto/PEMStructure.java @@ -10,8 +10,8 @@ package com.trilead.ssh2.crypto; public class PEMStructure
{
- int pemType;
+ public int pemType;
String dekInfo[];
String procType[];
- byte[] data;
+ public byte[] data;
}
\ No newline at end of file |