X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinstore.c;h=6944849658f5ff185df52bfee39e239a6dce31e0;hb=9f9d72ec58642e91b4f93ee4405a8086ee2fb2f0;hp=b1058832e99a11da3e48d44216a555da809aca07;hpb=9fa5b9858c61e45fd2ad6b892018bb9b2740dd84;p=PuTTY.git diff --git a/windows/winstore.c b/windows/winstore.c index b1058832..69448496 100644 --- a/windows/winstore.c +++ b/windows/winstore.c @@ -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;