diff src/ch/ethz/ssh2/KnownHosts.java @ 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
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) {