mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-23 15:09:24 -05:00
Uppity: option to disallow SSH-1 compression.
With this and the ciphers, I think we've now got the full range of SSH-1 config options (such as they are) that correspond to varying the KEXINIT strings in SSH-2.
This commit is contained in:
parent
cbff2d1960
commit
f9e2c7b1fe
@ -97,7 +97,7 @@ bool ssh1_handle_direction_specific_packet(
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case SSH1_CMSG_REQUEST_COMPRESSION:
|
case SSH1_CMSG_REQUEST_COMPRESSION:
|
||||||
if (s->compressing) {
|
if (s->compressing || !s->ssc->ssh1_allow_compression) {
|
||||||
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH1_SMSG_FAILURE);
|
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH1_SMSG_FAILURE);
|
||||||
pq_push(s->ppl.out_pq, pktout);
|
pq_push(s->ppl.out_pq, pktout);
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,6 +15,7 @@ struct SshServerConfig {
|
|||||||
bool exit_signal_numeric; /* mimic an old server bug */
|
bool exit_signal_numeric; /* mimic an old server bug */
|
||||||
|
|
||||||
unsigned long ssh1_cipher_mask;
|
unsigned long ssh1_cipher_mask;
|
||||||
|
bool ssh1_allow_compression;
|
||||||
};
|
};
|
||||||
|
|
||||||
Plug *ssh_server_plug(
|
Plug *ssh_server_plug(
|
||||||
|
@ -338,6 +338,7 @@ static void show_help(FILE *fp)
|
|||||||
" --kexinit-sccomp STR override list of SSH-2 "
|
" --kexinit-sccomp STR override list of SSH-2 "
|
||||||
"s->c compression types\n"
|
"s->c compression types\n"
|
||||||
" --ssh1-ciphers STR override list of SSH-1 ciphers\n"
|
" --ssh1-ciphers STR override list of SSH-1 ciphers\n"
|
||||||
|
" --ssh1-no-compression forbid compression in SSH-1\n"
|
||||||
" --exitsignum send buggy numeric \"exit-signal\" "
|
" --exitsignum send buggy numeric \"exit-signal\" "
|
||||||
"message\n"
|
"message\n"
|
||||||
" --verbose print event log messages to standard "
|
" --verbose print event log messages to standard "
|
||||||
@ -539,6 +540,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
ssc.session_starting_dir = getenv("HOME");
|
ssc.session_starting_dir = getenv("HOME");
|
||||||
ssc.ssh1_cipher_mask = SSH1_SUPPORTED_CIPHER_MASK;
|
ssc.ssh1_cipher_mask = SSH1_SUPPORTED_CIPHER_MASK;
|
||||||
|
ssc.ssh1_allow_compression = true;
|
||||||
|
|
||||||
if (argc <= 1) {
|
if (argc <= 1) {
|
||||||
/*
|
/*
|
||||||
@ -760,6 +762,8 @@ int main(int argc, char **argv)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ssc.ssh1_cipher_mask = mask;
|
ssc.ssh1_cipher_mask = mask;
|
||||||
|
} else if (longoptnoarg(arg, "--ssh1-no-compression")) {
|
||||||
|
ssc.ssh1_allow_compression = false;
|
||||||
} else if (longoptnoarg(arg, "--exitsignum")) {
|
} else if (longoptnoarg(arg, "--exitsignum")) {
|
||||||
ssc.exit_signal_numeric = true;
|
ssc.exit_signal_numeric = true;
|
||||||
} else if (longoptarg(arg, "--sshlog", &val, &argc, &argv) ||
|
} else if (longoptarg(arg, "--sshlog", &val, &argc, &argv) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user