]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxstore.c
Use readonly edit controls in some Windows dialogs.
[PuTTY.git] / unix / uxstore.c
index 567b08d6ee51e52e5259a6af6c2979bc2d32b2cb..51242eab1ad018fb6f344442ab3cbde2d82289ed 100644 (file)
@@ -589,6 +589,16 @@ int verify_host_key(const char *hostname, int port,
     return ret;
 }
 
+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)
 {