зеркало из https://github.com/github/putty.git
At long last: PuTTY will now report its version to the server
sensibly, as a release or a snapshot or a local build. With any luck this should make bug reporting easier to handle, because anyone who sends their Event Log should automatically include the version :-) [originally from svn r1003]
This commit is contained in:
Родитель
a405770ec5
Коммит
080d59422b
8
ssh.c
8
ssh.c
|
@ -1193,7 +1193,8 @@ static int do_ssh_init(unsigned char c) {
|
|||
/*
|
||||
* This is a v2 server. Begin v2 protocol.
|
||||
*/
|
||||
char *verstring = "SSH-2.0-PuTTY";
|
||||
char verstring[80];
|
||||
sprintf(verstring, "SSH-2.0-%s", sshver);
|
||||
SHA_Init(&exhashbase);
|
||||
/*
|
||||
* Hash our version string and their version string.
|
||||
|
@ -1212,8 +1213,9 @@ static int do_ssh_init(unsigned char c) {
|
|||
/*
|
||||
* This is a v1 server. Begin v1 protocol.
|
||||
*/
|
||||
sprintf(vstring, "SSH-%s-PuTTY\n",
|
||||
(ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"));
|
||||
sprintf(vstring, "SSH-%s-%s\n",
|
||||
(ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"),
|
||||
sshver);
|
||||
sprintf(vlog, "We claim version: %s", vstring);
|
||||
vlog[strcspn(vlog, "\r\n")] = '\0';
|
||||
logevent(vlog);
|
||||
|
|
5
ssh.h
5
ssh.h
|
@ -182,6 +182,11 @@ extern const struct ssh_mac ssh_md5;
|
|||
extern const struct ssh_mac ssh_sha1;
|
||||
extern const struct ssh_mac ssh_sha1_buggy;
|
||||
|
||||
/*
|
||||
* PuTTY version number formatted as an SSH version string.
|
||||
*/
|
||||
extern char sshver[];
|
||||
|
||||
#ifndef MSCRYPTOAPI
|
||||
void SHATransform(word32 *digest, word32 *data);
|
||||
#endif
|
||||
|
|
|
@ -8,13 +8,22 @@
|
|||
#if defined SNAPSHOT
|
||||
|
||||
char ver[] = "Development snapshot " STR(SNAPSHOT);
|
||||
char sshver[] = "PuTTY-Snapshot-" STR(SNAPSHOT);
|
||||
|
||||
#elif defined RELEASE
|
||||
|
||||
char ver[] = "Release " STR(RELEASE);
|
||||
char sshver[] = "PuTTY-Release-" STR(RELEASE);
|
||||
|
||||
#else
|
||||
|
||||
char ver[] = "Unidentified build, " __DATE__ " " __TIME__;
|
||||
char sshver[] = "PuTTY-Local: " __DATE__ " " __TIME__;
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SSH local version string MUST be under 40 characters. Here's a
|
||||
* compile time assertion to verify this.
|
||||
*/
|
||||
enum { vorpal_sword = 1 / (sizeof(sshver) <= 40) };
|
||||
|
|
Загрузка…
Ссылка в новой задаче