]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winstore.c
Handle packets with no type byte by returning SSH_MSG_UNIMPLEMENTED.
[PuTTY.git] / windows / winstore.c
index b1058832e99a11da3e48d44216a555da809aca07..6944849658f5ff185df52bfee39e239a6dce31e0 100644 (file)
@@ -454,6 +454,16 @@ int verify_host_key(const char *hostname, int port,
        return 0;                      /* key matched OK in registry */
 }
 
+int have_ssh_host_key(const char *hostname, int port,
+                     const char *keytype)
+{
+    /*
+     * If we have a host key, verify_host_key will return 0 or 2.
+     * If we don't have one, it'll return 1.
+     */
+    return verify_host_key(hostname, port, keytype, "") != 1;
+}
+
 void store_host_key(const char *hostname, int port,
                    const char *keytype, const char *key)
 {
@@ -647,7 +657,7 @@ static int transform_jumplist_registry
     int ret;
     HKEY pjumplist_key, psettings_tmp;
     DWORD type;
-    int value_length;
+    DWORD value_length;
     char *old_value, *new_value;
     char *piterator_old, *piterator_new, *piterator_tmp;