mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-21 22:28:37 -05:00
Merge reconfig fixes from branch 'pre-0.64'.
This commit is contained in:
commit
0ab2e03ef2
21
config.c
21
config.c
@ -2137,7 +2137,8 @@ void setup_config_box(struct controlbox *b, int midsession,
|
|||||||
ctrl_settitle(b, "Connection/SSH",
|
ctrl_settitle(b, "Connection/SSH",
|
||||||
"Options controlling SSH connections");
|
"Options controlling SSH connections");
|
||||||
|
|
||||||
if (midsession && protcfginfo == 1) {
|
/* SSH-1 or connection-sharing downstream */
|
||||||
|
if (midsession && (protcfginfo == 1 || protcfginfo == -1)) {
|
||||||
s = ctrl_getset(b, "Connection/SSH", "disclaimer", NULL);
|
s = ctrl_getset(b, "Connection/SSH", "disclaimer", NULL);
|
||||||
ctrl_text(s, "Nothing on this panel may be reconfigured in mid-"
|
ctrl_text(s, "Nothing on this panel may be reconfigured in mid-"
|
||||||
"session; it is only here so that sub-panels of it can "
|
"session; it is only here so that sub-panels of it can "
|
||||||
@ -2159,7 +2160,7 @@ void setup_config_box(struct controlbox *b, int midsession,
|
|||||||
I(CONF_ssh_no_shell));
|
I(CONF_ssh_no_shell));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!midsession || protcfginfo != 1) {
|
if (!midsession || !(protcfginfo == 1 || protcfginfo == -1)) {
|
||||||
s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options");
|
s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options");
|
||||||
|
|
||||||
ctrl_checkbox(s, "Enable compression", 'e',
|
ctrl_checkbox(s, "Enable compression", 'e',
|
||||||
@ -2203,10 +2204,11 @@ void setup_config_box(struct controlbox *b, int midsession,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* The Connection/SSH/Kex panel. (Owing to repeat key
|
* The Connection/SSH/Kex panel. (Owing to repeat key
|
||||||
* exchange, this is all meaningful in mid-session _if_
|
* exchange, much of this is meaningful in mid-session _if_
|
||||||
* we're using SSH-2 or haven't decided yet.)
|
* we're using SSH-2 and are not a connection-sharing
|
||||||
|
* downstream, or haven't decided yet.)
|
||||||
*/
|
*/
|
||||||
if (protcfginfo != 1) {
|
if (protcfginfo != 1 && protcfginfo != -1) {
|
||||||
ctrl_settitle(b, "Connection/SSH/Kex",
|
ctrl_settitle(b, "Connection/SSH/Kex",
|
||||||
"Options controlling SSH key exchange");
|
"Options controlling SSH key exchange");
|
||||||
|
|
||||||
@ -2232,7 +2234,14 @@ void setup_config_box(struct controlbox *b, int midsession,
|
|||||||
I(16));
|
I(16));
|
||||||
ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)",
|
ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)",
|
||||||
HELPCTX(ssh_kex_repeat));
|
HELPCTX(ssh_kex_repeat));
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Manual host key configuration is irrelevant mid-session,
|
||||||
|
* as we enforce that the host key for rekeys is the
|
||||||
|
* same as that used at the start of the session.
|
||||||
|
*/
|
||||||
|
if (!midsession) {
|
||||||
s = ctrl_getset(b, "Connection/SSH/Kex", "hostkeys",
|
s = ctrl_getset(b, "Connection/SSH/Kex", "hostkeys",
|
||||||
"Manually configure host keys for this connection");
|
"Manually configure host keys for this connection");
|
||||||
|
|
||||||
@ -2270,7 +2279,7 @@ void setup_config_box(struct controlbox *b, int midsession,
|
|||||||
ctrl_columns(s, 1, 100);
|
ctrl_columns(s, 1, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!midsession || protcfginfo != 1) {
|
if (!midsession || !(protcfginfo == 1 || protcfginfo == -1)) {
|
||||||
/*
|
/*
|
||||||
* The Connection/SSH/Cipher panel.
|
* The Connection/SSH/Cipher panel.
|
||||||
*/
|
*/
|
||||||
|
12
ssh.c
12
ssh.c
@ -11321,13 +11321,19 @@ static int ssh_return_exitcode(void *handle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* cfg_info for SSH is the currently running version of the
|
* cfg_info for SSH is the protocol running in this session.
|
||||||
* protocol. (1 for 1; 2 for 2; 0 for not-decided-yet.)
|
* (1 or 2 for the full SSH-1 or SSH-2 protocol; -1 for the bare
|
||||||
|
* SSH-2 connection protocol, i.e. a downstream; 0 for not-decided-yet.)
|
||||||
*/
|
*/
|
||||||
static int ssh_cfg_info(void *handle)
|
static int ssh_cfg_info(void *handle)
|
||||||
{
|
{
|
||||||
Ssh ssh = (Ssh) handle;
|
Ssh ssh = (Ssh) handle;
|
||||||
return ssh->version;
|
if (ssh->version == 0)
|
||||||
|
return 0; /* don't know yet */
|
||||||
|
else if (ssh->bare_connection)
|
||||||
|
return -1;
|
||||||
|
else
|
||||||
|
return ssh->version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user