192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
#define BUG_CHOKES_ON_RSA 8
#define BUG_SSH2_RSA_PADDING 16
#define BUG_SSH2_DERIVEKEY 32
#define BUG_SSH2_REKEY 64
#define BUG_SSH2_PK_SESSIONID 128
#define BUG_SSH2_MAXPKT 256
#define BUG_CHOKES_ON_SSH2_IGNORE 512
/*
* Codes for terminal modes.
* Most of these are the same in SSH-1 and SSH-2.
* This list is derived from RFC 4254 and
* SSH-1 RFC-1.2.31.
*/
|
>
|
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
#define BUG_CHOKES_ON_RSA 8
#define BUG_SSH2_RSA_PADDING 16
#define BUG_SSH2_DERIVEKEY 32
#define BUG_SSH2_REKEY 64
#define BUG_SSH2_PK_SESSIONID 128
#define BUG_SSH2_MAXPKT 256
#define BUG_CHOKES_ON_SSH2_IGNORE 512
#define BUG_CHOKES_ON_WINADJ 1024
/*
* Codes for terminal modes.
* Most of these are the same in SSH-1 and SSH-2.
* This list is derived from RFC 4254 and
* SSH-1 RFC-1.2.31.
*/
|
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
|
/*
* Servers that don't support SSH2_MSG_IGNORE. Currently,
* none detected automatically.
*/
ssh->remote_bugs |= BUG_CHOKES_ON_SSH2_IGNORE;
logevent("We believe remote version has SSH-2 ignore bug");
}
}
/*
* The `software version' part of an SSH version string is required
* to contain no spaces or minus signs.
*/
static void ssh_fix_verstring(char *str)
|
>
>
>
>
>
>
>
>
>
|
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
|
/*
* Servers that don't support SSH2_MSG_IGNORE. Currently,
* none detected automatically.
*/
ssh->remote_bugs |= BUG_CHOKES_ON_SSH2_IGNORE;
logevent("We believe remote version has SSH-2 ignore bug");
}
if (conf_get_int(ssh->conf, CONF_sshbug_winadj) == FORCE_ON) {
/*
* Servers that don't support our winadj request for one
* reason or another. Currently, none detected automatically.
*/
ssh->remote_bugs |= BUG_CHOKES_ON_WINADJ;
logevent("We believe remote version has winadj bug");
}
}
/*
* The `software version' part of an SSH version string is required
* to contain no spaces or minus signs.
*/
static void ssh_fix_verstring(char *str)
|
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
|
*
* We also only send this if the main channel has finished its
* initial CHANNEL_REQUESTs and installed the default
* CHANNEL_FAILURE handler, so as not to risk giving it
* unexpected CHANNEL_FAILUREs.
*/
if (newwin == c->v.v2.locmaxwin &&
ssh->packet_dispatch[SSH2_MSG_CHANNEL_FAILURE]) {
pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
ssh2_pkt_adduint32(pktout, c->remoteid);
ssh2_pkt_addstring(pktout, "winadj@putty.projects.tartarus.org");
ssh2_pkt_addbool(pktout, TRUE);
ssh2_pkt_send(ssh, pktout);
/*
|
|
>
|
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
|
*
* We also only send this if the main channel has finished its
* initial CHANNEL_REQUESTs and installed the default
* CHANNEL_FAILURE handler, so as not to risk giving it
* unexpected CHANNEL_FAILUREs.
*/
if (newwin == c->v.v2.locmaxwin &&
ssh->packet_dispatch[SSH2_MSG_CHANNEL_FAILURE] &&
!(ssh->remote_bugs & BUG_CHOKES_ON_WINADJ)) {
pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
ssh2_pkt_adduint32(pktout, c->remoteid);
ssh2_pkt_addstring(pktout, "winadj@putty.projects.tartarus.org");
ssh2_pkt_addbool(pktout, TRUE);
ssh2_pkt_send(ssh, pktout);
/*
|