Mercurial > 510Connectbot
changeset 314:d85bc45139f2 ganymed
add ecdsa key support everywhere
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 16:25:29 -0700 |
parents | 1d400fd78e4a |
children | eeb7ae13833b |
files | src/ch/ethz/ssh2/crypto/dh/GenericDhExchange.java src/ch/ethz/ssh2/transport/ClientKexManager.java src/ch/ethz/ssh2/transport/ServerKexManager.java |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/crypto/dh/GenericDhExchange.java Wed Jul 30 16:19:33 2014 -0700 +++ b/src/ch/ethz/ssh2/crypto/dh/GenericDhExchange.java Wed Jul 30 16:25:29 2014 -0700 @@ -42,6 +42,10 @@ */ public abstract byte[] getE(); + public setE(BigInteger e) throws IOException { + throw IOException; + } + /** * @return Returns the server's e (public value) * @throws IllegalStateException
--- a/src/ch/ethz/ssh2/transport/ClientKexManager.java Wed Jul 30 16:19:33 2014 -0700 +++ b/src/ch/ethz/ssh2/transport/ClientKexManager.java Wed Jul 30 16:25:29 2014 -0700 @@ -297,7 +297,7 @@ } kxs.dhx.setF(dhr.getF().toByteArray()); try { - kxs.H = kxs.dhx.calculateH(kxs.hashAlgo, csh.getClientString(), csh.getServerString(), kxs.localKEX.getPayload(), + kxs.H = kxs.dhx.calculateH(csh.getClientString(), csh.getServerString(), kxs.localKEX.getPayload(), kxs.remoteKEX.getPayload(), dhr.getHostKey()); } catch(IllegalArgumentException e) {
--- a/src/ch/ethz/ssh2/transport/ServerKexManager.java Wed Jul 30 16:19:33 2014 -0700 +++ b/src/ch/ethz/ssh2/transport/ServerKexManager.java Wed Jul 30 16:25:29 2014 -0700 @@ -218,7 +218,7 @@ signature = DSASHA1Verify.encodeSSHDSASignature(ds); } - PacketKexDHReply dhr = new PacketKexDHReply(hostKey, kxs.dhx.getF(), signature); + PacketKexDHReply dhr = new PacketKexDHReply(hostKey, new BigInteger(kxs.dhx.getF()), signature); tm.sendKexMessage(dhr.getPayload()); finishKex(false);