diff options
author | Kenny Root <kenny@the-b.org> | 2013-02-06 21:34:15 -0800 |
---|---|---|
committer | Kenny Root <kenny@the-b.org> | 2013-02-06 21:34:15 -0800 |
commit | d36f48b37697e8f7797a9a8435647577675a6a5b (patch) | |
tree | 2b4f83c2aa22c02b72404aa93d7c942710659ed8 /src/com/trilead/ssh2/transport | |
parent | aee3c2fdf1d32edec258cb5fb1c25357dde5183e (diff) | |
download | connectbot-d36f48b37697e8f7797a9a8435647577675a6a5b.tar.gz connectbot-d36f48b37697e8f7797a9a8435647577675a6a5b.tar.bz2 connectbot-d36f48b37697e8f7797a9a8435647577675a6a5b.zip |
Add support for ECDSA P-384 and P-521
Diffstat (limited to 'src/com/trilead/ssh2/transport')
-rw-r--r-- | src/com/trilead/ssh2/transport/KexManager.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/trilead/ssh2/transport/KexManager.java b/src/com/trilead/ssh2/transport/KexManager.java index 1a32a39..a74a224 100644 --- a/src/com/trilead/ssh2/transport/KexManager.java +++ b/src/com/trilead/ssh2/transport/KexManager.java @@ -50,6 +50,8 @@ public class KexManager private static final Set<String> HOSTKEY_ALGS = new TreeSet<String>();
static {
HOSTKEY_ALGS.add("ecdsa-sha2-nistp256");
+ HOSTKEY_ALGS.add("ecdsa-sha2-nistp384");
+ HOSTKEY_ALGS.add("ecdsa-sha2-nistp521");
HOSTKEY_ALGS.add("ssh-rsa");
HOSTKEY_ALGS.add("ssh-dsa");
}
@@ -353,12 +355,12 @@ public class KexManager private boolean verifySignature(byte[] sig, byte[] hostkey) throws IOException
{
- if (kxs.np.server_host_key_algo.equals("ecdsa-sha2-nistp256"))
+ if (kxs.np.server_host_key_algo.startsWith("ecdsa-sha2-"))
{
byte[] rs = ECDSASHA2Verify.decodeSSHECDSASignature(sig);
ECPublicKey epk = ECDSASHA2Verify.decodeSSHECDSAPublicKey(hostkey);
- log.log(50, "Verifying ecdsa-sha2-nistp256");
+ log.log(50, "Verifying ecdsa signature");
return ECDSASHA2Verify.verifySignature(kxs.H, rs, epk);
}
|