1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-06 22:12:47 -05:00

Server prep: pass "implementation name" to ssh_verstring_new.

The word 'PuTTY' in the outgoing SSH version string has always
represented the name of the *SSH implementation* as opposed to the
name of the specific program containing it (for example, PSCP and
PSFTP don't announce themselves with a different banner). But I think
that a change from client to server merits a change in that
implementation name, so I'm removing the prefix "PuTTY" from the
constant string sshver[], and moving it to a parameter passed in
separately to ssh_verstring_new, so that the upcoming server can pass
in a different one.
This commit is contained in:
Simon Tatham
2018-10-21 09:29:17 +01:00
parent 8343961705
commit 650404f32c
5 changed files with 15 additions and 10 deletions

2
ssh.c
View File

@ -717,7 +717,7 @@ static const char *connect_to_host(Ssh *ssh, const char *host, int port,
ssh->version_receiver.got_ssh_version = ssh_got_ssh_version;
ssh->bpp = ssh_verstring_new(
ssh->conf, ssh->logctx, ssh->bare_connection,
ssh->version == 1 ? "1.5" : "2.0", &ssh->version_receiver);
ssh->version == 1 ? "1.5" : "2.0", &ssh->version_receiver, "PuTTY");
ssh_connect_bpp(ssh);
queue_idempotent_callback(&ssh->bpp->ic_in_raw);