X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxstore.c;h=51242eab1ad018fb6f344442ab3cbde2d82289ed;hb=15386cbe927fc85ac2fed0bb47704645c4b67dad;hp=567b08d6ee51e52e5259a6af6c2979bc2d32b2cb;hpb=9c8a3cb6fbdd2fe620fa68343177b351a5b47f95;p=PuTTY.git diff --git a/unix/uxstore.c b/unix/uxstore.c index 567b08d6..51242eab 100644 --- a/unix/uxstore.c +++ b/unix/uxstore.c @@ -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) {