1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-17 02:57:33 -05:00

Add switch to choose SSH v1-versus-v2 protocol preference where both

are available

[originally from svn r584]
This commit is contained in:
Simon Tatham
2000-09-11 09:37:43 +00:00
parent 22f91a3604
commit 334b79e16c
5 changed files with 31 additions and 5 deletions

6
ssh.c
View File

@ -952,7 +952,11 @@ static int do_ssh_init(void) {
vlog[strcspn(vlog, "\r\n")] = '\0';
logevent(vlog);
if (ssh_versioncmp(version, "2.0" /* FIXME: "1.99" */ ) >= 0) {
/*
* Server version "1.99" means we can choose whether we use v1
* or v2 protocol. Choice is based on cfg.sshprot.
*/
if (ssh_versioncmp(version, cfg.sshprot == 1 ? "2.0" : "1.99") >= 0) {
/*
* This is a v2 server. Begin v2 protocol.
*/