mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 03:53:01 -05:00
Rearrange verify_ssh_host_key() for robustness in the face of strangeness, in
the same manner as windows/windlg.c (but tested this time :) [originally from svn r5380]
This commit is contained in:
parent
bb874319fb
commit
62f83a3666
@ -2347,13 +2347,12 @@ int verify_ssh_host_key(void *frontend, char *host, int port, char *keytype,
|
|||||||
|
|
||||||
sfree(text);
|
sfree(text);
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 2) {
|
||||||
return 0; /* do not continue with connection */
|
store_host_key(host, port, keytype, keystr);
|
||||||
else {
|
return 1; /* continue with connection */
|
||||||
if (ret == 2)
|
} else if (ret == 1)
|
||||||
store_host_key(host, port, keytype, keystr);
|
return 1; /* continue with connection */
|
||||||
return 1; /* continue with connection */
|
return 0; /* do not continue with connection */
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user