diff options
author | Kenny Root <kenny@the-b.org> | 2007-11-17 05:58:42 +0000 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2007-11-17 05:58:42 +0000 |
commit | dfa41d090260eed63f3d8510571a2f6236a5ff45 (patch) | |
tree | 1eaca308ba9bb913161edf83bfef5f9295784e56 /src/com/trilead/ssh2/packets/PacketUserauthFailure.java | |
parent | edfccaafe3e754ed124afa67465b6044eacd3987 (diff) | |
download | connectbot-dfa41d090260eed63f3d8510571a2f6236a5ff45.tar.gz connectbot-dfa41d090260eed63f3d8510571a2f6236a5ff45.tar.bz2 connectbot-dfa41d090260eed63f3d8510571a2f6236a5ff45.zip |
Initial import.
Diffstat (limited to 'src/com/trilead/ssh2/packets/PacketUserauthFailure.java')
-rw-r--r-- | src/com/trilead/ssh2/packets/PacketUserauthFailure.java | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/com/trilead/ssh2/packets/PacketUserauthFailure.java b/src/com/trilead/ssh2/packets/PacketUserauthFailure.java new file mode 100644 index 0000000..77e9cf9 --- /dev/null +++ b/src/com/trilead/ssh2/packets/PacketUserauthFailure.java @@ -0,0 +1,53 @@ +
+package com.trilead.ssh2.packets;
+
+import java.io.IOException;
+
+/**
+ * PacketUserauthBanner.
+ *
+ * @author Christian Plattner, plattner@trilead.com
+ * @version $Id: PacketUserauthFailure.java,v 1.1 2007/10/15 12:49:55 cplattne Exp $
+ */
+public class PacketUserauthFailure
+{
+ byte[] payload;
+
+ String[] authThatCanContinue;
+ boolean partialSuccess;
+
+ public PacketUserauthFailure(String[] authThatCanContinue, boolean partialSuccess)
+ {
+ this.authThatCanContinue = authThatCanContinue;
+ this.partialSuccess = partialSuccess;
+ }
+
+ public PacketUserauthFailure(byte payload[], int off, int len) throws IOException
+ {
+ this.payload = new byte[len];
+ System.arraycopy(payload, off, this.payload, 0, len);
+
+ TypesReader tr = new TypesReader(payload, off, len);
+
+ int packet_type = tr.readByte();
+
+ if (packet_type != Packets.SSH_MSG_USERAUTH_FAILURE)
+ throw new IOException("This is not a SSH_MSG_USERAUTH_FAILURE! (" + packet_type + ")");
+
+ authThatCanContinue = tr.readNameList();
+ partialSuccess = tr.readBoolean();
+
+ if (tr.remain() != 0)
+ throw new IOException("Padding in SSH_MSG_USERAUTH_FAILURE packet!");
+ }
+
+ public String[] getAuthThatCanContinue()
+ {
+ return authThatCanContinue;
+ }
+
+ public boolean isPartialSuccess()
+ {
+ return partialSuccess;
+ }
+}
|