Mercurial > 510Connectbot
changeset 286:4656869af8fe ganymed
start conversion from trilead to ganymed
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 18 Jul 2014 19:26:29 -0700 |
parents | 486df527ddc5 |
children | db9b028016de |
files | src/ch/ethz/ssh2/KnownHosts.java src/ch/ethz/ssh2/server/ServerConnectionState.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/KnownHosts.java Fri Jul 18 18:33:40 2014 -0700 +++ b/src/ch/ethz/ssh2/KnownHosts.java Fri Jul 18 19:26:29 2014 -0700 @@ -25,6 +25,8 @@ import ch.ethz.ssh2.crypto.digest.HMAC; import ch.ethz.ssh2.crypto.digest.MD5; import ch.ethz.ssh2.crypto.digest.SHA1; +import java.security.KeyPair; +import java.security.PrivateKey; import java.security.PublicKey; import java.security.interfaces.DSAPublicKey; import java.security.interfaces.ECPublicKey; @@ -57,9 +59,9 @@ private class KnownHostsEntry { String[] patterns; - Object key; + PublicKey key; - KnownHostsEntry(String[] patterns, Object key) { + KnownHostsEntry(String[] patterns, PublicKey key) { this.patterns = patterns; this.key = key; } @@ -235,7 +237,7 @@ return true; } - private int checkKey(String remoteHostname, Object remoteKey) { + private int checkKey(String remoteHostname, PublicKey remoteKey) { int result = HOSTKEY_IS_NEW; synchronized(publicKeys) {
--- a/src/ch/ethz/ssh2/server/ServerConnectionState.java Fri Jul 18 18:33:40 2014 -0700 +++ b/src/ch/ethz/ssh2/server/ServerConnectionState.java Fri Jul 18 19:26:29 2014 -0700 @@ -35,9 +35,9 @@ /* Settings for the next key exchange */ public CryptoWishList next_cryptoWishList = CryptoWishList.forServer(); - public DSAPrivateKey next_dsa_key; - public ECPrivateKey next_ec_key; - public RSAPrivateKey next_rsa_key; + public KeyPair next_dsa_key; + public KeyPair next_ec_key; + public KeyPair next_rsa_key; public Socket s;