diff src/ch/ethz/ssh2/transport/ServerKexManager.java @ 285:486df527ddc5 ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 18:33:40 -0700
parents 4ec87de11e71
children db9b028016de
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/transport/ServerKexManager.java	Fri Jul 18 18:08:56 2014 -0700
+++ b/src/ch/ethz/ssh2/transport/ServerKexManager.java	Fri Jul 18 18:33:40 2014 -0700
@@ -167,11 +167,11 @@
                 byte[] hostKey = null;
 
                 if(kxs.np.server_host_key_algo.equals("ssh-rsa")) {
-                    hostKey = RSASHA1Verify.encodeSSHRSAPublicKey(kxs.local_rsa_key.getPublic());
+                    hostKey = RSASHA1Verify.encodeSSHRSAPublicKey((RSAPublicKey)kxs.local_rsa_key.getPublic());
                 }
 
                 if(kxs.np.server_host_key_algo.equals("ssh-dss")) {
-                    hostKey = DSASHA1Verify.encodeSSHDSAPublicKey(kxs.local_dsa_key.getPublic());
+                    hostKey = DSASHA1Verify.encodeSSHDSAPublicKey((DSAPublicKey)kxs.local_dsa_key.getPublic());
                 }
 
                 try {
@@ -187,12 +187,12 @@
                 byte[] signature = null;
 
                 if(kxs.np.server_host_key_algo.equals("ssh-rsa")) {
-                    byte[] rs = RSASHA1Verify.generateSignature(kxs.H, kxs.local_rsa_key);
+                    byte[] rs = RSASHA1Verify.generateSignature(kxs.H, (RSAPrivateKey)kxs.local_rsa_key.getPrivate());
                     signature = RSASHA1Verify.encodeSSHRSASignature(rs);
                 }
 
                 if(kxs.np.server_host_key_algo.equals("ssh-dss")) {
-                    byte[] ds = DSASHA1Verify.generateSignature(kxs.H, kxs.local_dsa_key, rnd);
+                    byte[] ds = DSASHA1Verify.generateSignature(kxs.H, (DSAPrivateKey)kxs.local_dsa_key.getPrivate(), rnd);
                     signature = DSASHA1Verify.encodeSSHDSASignature(ds);
                 }