aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/trilead/ssh2
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/trilead/ssh2')
-rw-r--r--src/com/trilead/ssh2/signature/ECDSASHA2Verify.java5
-rw-r--r--src/com/trilead/ssh2/transport/KexManager.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/com/trilead/ssh2/signature/ECDSASHA2Verify.java b/src/com/trilead/ssh2/signature/ECDSASHA2Verify.java
index 97bda5f..4f3bae2 100644
--- a/src/com/trilead/ssh2/signature/ECDSASHA2Verify.java
+++ b/src/com/trilead/ssh2/signature/ECDSASHA2Verify.java
@@ -382,12 +382,13 @@ public class ECDSASHA2Verify {
{
byte[] affineX = removeLeadingZeroes(group.getAffineX().toByteArray());
- System.arraycopy(affineX, 0, M, 1, affineX.length);
+ System.arraycopy(affineX, 0, M, 1 + elementSize - affineX.length, affineX.length);
}
{
byte[] affineY = removeLeadingZeroes(group.getAffineY().toByteArray());
- System.arraycopy(affineY, 0, M, 1 + elementSize, affineY.length);
+ System.arraycopy(affineY, 0, M, 1 + elementSize + elementSize - affineY.length,
+ affineY.length);
}
return M;
diff --git a/src/com/trilead/ssh2/transport/KexManager.java b/src/com/trilead/ssh2/transport/KexManager.java
index 04043e4..6e0d904 100644
--- a/src/com/trilead/ssh2/transport/KexManager.java
+++ b/src/com/trilead/ssh2/transport/KexManager.java
@@ -483,7 +483,7 @@ public class KexManager
return;
}
- throw new IllegalStateException("Unkown KEX method!");
+ throw new IllegalStateException("Unknown KEX method!");
}
if (msg[0] == Packets.SSH_MSG_NEWKEYS)