diff --git a/ssh_api.c b/ssh_api.c index 47f5f81..1ed75f9 100644 --- a/ssh_api.c +++ b/ssh_api.c @@ -385,7 +385,7 @@ _ssh_send_banner(struct ssh *ssh, char **bannerp) #ifndef WIN32_FIXME snprintf(buf, sizeof buf, "SSH-2.0-%.100s\r\n", SSH_VERSION); #else - snprintf(buf, sizeof buf, "SSH-2.0-%.100sp1 Microsoft Win32 port %s\r\n", SSH_VERSION, __DATE__ ); + snprintf(buf, sizeof buf, "SSH-2.0-%.100sp1 Microsoft_Win32_port %s\r\n", SSH_VERSION, __DATE__ ); #endif if ((r = sshbuf_put(ssh_packet_get_output(ssh), buf, strlen(buf))) != 0) return r; diff --git a/sshconnect.c b/sshconnect.c index 12948c7..2608602 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -682,10 +682,10 @@ send_client_banner(int connection_out, int minor1) PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION); #else #ifdef WIN32_VS - xasprintf(&client_version_string, "SSH-%d.%d-%.100sp1 Microsoft Win32 port with VS %s\r\n", + xasprintf(&client_version_string, "SSH-%d.%d-%.100sp1 Microsoft_Win32_port_with_VS %s\r\n", PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION, __DATE__ ); #else - xasprintf(&client_version_string, "SSH-%d.%d-%.100sp1 Microsoft Win32 port %s\r\n", + xasprintf(&client_version_string, "SSH-%d.%d-%.100sp1 Microsoft_Win32_port %s\r\n", PROTOCOL_MAJOR_2, PROTOCOL_MINOR_2, SSH_VERSION, __DATE__ ); #endif #endif diff --git a/sshd.c b/sshd.c index 47b54f3..074e089 100644 --- a/sshd.c +++ b/sshd.c @@ -739,10 +739,17 @@ sshd_exchange_identification(int sock_in, int sock_out) minor = PROTOCOL_MINOR_1; } + #ifndef WIN32_FIXME xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s", - major, minor, SSH_VERSION, + major, minor, SSH_VERSION, + *options.version_addendum == '\0' ? "" : " ", + options.version_addendum, newline); + #else + xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s", + major, minor, SSH_RELEASE, *options.version_addendum == '\0' ? "" : " ", options.version_addendum, newline); + #endif /* Send our protocol version identification. */ if (roaming_atomicio(vwrite, sock_out, server_version_string, diff --git a/version.h b/version.h index 6e9c2ef..51052cb 100644 --- a/version.h +++ b/version.h @@ -6,9 +6,9 @@ #define SSH_PORTABLE "p1" #else #ifdef WIN32_VS -#define SSH_PORTABLE "p1 Microsoft Win32 port with VS" +#define SSH_PORTABLE "p1 Microsoft_Win32_port_with_VS" #else -#define SSH_PORTABLE "p1 Microsoft Win32 port" +#define SSH_PORTABLE "p1 Microsoft_Win32_port" #endif #endif #define SSH_RELEASE SSH_VERSION SSH_PORTABLE