changeset 311:fde9d6568bea ganymed

add ecdsa key support everywhere
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 15:02:30 -0700
parents 9e42082d1f93
children 1442be38051b
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, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/crypto/dh/GenericDhExchange.java	Wed Jul 30 14:42:55 2014 -0700
+++ b/src/ch/ethz/ssh2/crypto/dh/GenericDhExchange.java	Wed Jul 30 15:02:30 2014 -0700
@@ -65,7 +65,7 @@
     public abstract void setF(byte[] f) throws IOException;
 
     public byte[] calculateH(byte[] clientversion, byte[] serverversion, byte[] clientKexPayload,
-                             byte[] serverKexPayload, byte[] hostKey) throws UnsupportedEncodingException {
+                             byte[] serverKexPayload, byte[] hostKey) throws UnsupportedEncodingException, IOException {
         HashForSSH2Types hash = new HashForSSH2Types(getHashAlgo());
 
         log.debug("Client: '" + new String(clientversion, "ISO-8859-1") + "'");
--- a/src/ch/ethz/ssh2/transport/ClientKexManager.java	Wed Jul 30 14:42:55 2014 -0700
+++ b/src/ch/ethz/ssh2/transport/ClientKexManager.java	Wed Jul 30 15:02:30 2014 -0700
@@ -257,7 +257,7 @@
                 kxs.dhgx.setF(dhgexrpl.getF());
 
                 try {
-                    kxs.H = kxs.dhgx.calculateH(csh.getClientString(), csh.getServerString(),
+                    kxs.H = kxs.dhgx.calculateH(kxs.hashAlgo, csh.getClientString(), csh.getServerString(),
                             kxs.localKEX.getPayload(), kxs.remoteKEX.getPayload(), dhgexrpl.getHostKey(),
                             kxs.dhgexParameters);
                 }
@@ -297,7 +297,7 @@
                 }
                 kxs.dhx.setF(dhr.getF());
                 try {
-                    kxs.H = kxs.dhx.calculateH(csh.getClientString(), csh.getServerString(), kxs.localKEX.getPayload(),
+                    kxs.H = kxs.dhx.calculateH(kxs.hashAlgo, 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 14:42:55 2014 -0700
+++ b/src/ch/ethz/ssh2/transport/ServerKexManager.java	Wed Jul 30 15:02:30 2014 -0700
@@ -18,7 +18,7 @@
 import ch.ethz.ssh2.auth.ServerAuthenticationManager;
 import ch.ethz.ssh2.crypto.cipher.BlockCipher;
 import ch.ethz.ssh2.crypto.cipher.BlockCipherFactory;
-import ch.ethz.ssh2.crypto.dh.DhExchange;
+import ch.ethz.ssh2.crypto.dh.GenericDhExchange;
 import ch.ethz.ssh2.crypto.digest.MAC;
 import ch.ethz.ssh2.packets.PacketKexDHInit;
 import ch.ethz.ssh2.packets.PacketKexDHReply;