mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-12 18:13:50 -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);
|
||||
|
||||
if (ret == 0)
|
||||
return 0; /* do not continue with connection */
|
||||
else {
|
||||
if (ret == 2)
|
||||
store_host_key(host, port, keytype, keystr);
|
||||
return 1; /* continue with connection */
|
||||
}
|
||||
if (ret == 2) {
|
||||
store_host_key(host, port, keytype, keystr);
|
||||
return 1; /* continue with connection */
|
||||
} else if (ret == 1)
|
||||
return 1; /* continue with connection */
|
||||
return 0; /* do not continue with connection */
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user