mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-07 06:22:47 -05:00
Loose end from r5031: the Kex panel should only be displayed in
mid-session if we are not using SSHv1. I've done this by introducing
a generic `cfg_info' function which every back end can use to
communicate an int's worth of data to setup_config_box; in SSH
that's the protocol version in use, and in everything else it's
currently zero.
[originally from svn r5040]
[r5031 == d77102a8d5
]
This commit is contained in:
51
config.c
51
config.c
@ -770,7 +770,7 @@ static void portfwd_handler(union control *ctrl, void *dlg,
|
||||
}
|
||||
|
||||
void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
|
||||
int midsession, int protocol)
|
||||
int midsession, int protocol, int protcfginfo)
|
||||
{
|
||||
struct controlset *s;
|
||||
struct sessionsaver_data *ssd;
|
||||
@ -1583,33 +1583,36 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
|
||||
|
||||
/*
|
||||
* The Connection/SSH/Kex panel. (Owing to repeat key
|
||||
* exchange, this is all meaningful in mid-session.)
|
||||
* exchange, this is all meaningful in mid-session _if_
|
||||
* we're using SSH2 or haven't decided yet.)
|
||||
*/
|
||||
ctrl_settitle(b, "Connection/SSH/Kex",
|
||||
"Options controlling SSH key exchange");
|
||||
if (protcfginfo != 1) {
|
||||
ctrl_settitle(b, "Connection/SSH/Kex",
|
||||
"Options controlling SSH key exchange");
|
||||
|
||||
s = ctrl_getset(b, "Connection/SSH/Kex", "main",
|
||||
"Key exchange algorithm options");
|
||||
c = ctrl_draglist(s, "Algorithm selection policy", 's',
|
||||
HELPCTX(ssh_kexlist),
|
||||
kexlist_handler, P(NULL));
|
||||
c->listbox.height = 5;
|
||||
s = ctrl_getset(b, "Connection/SSH/Kex", "main",
|
||||
"Key exchange algorithm options");
|
||||
c = ctrl_draglist(s, "Algorithm selection policy", 's',
|
||||
HELPCTX(ssh_kexlist),
|
||||
kexlist_handler, P(NULL));
|
||||
c->listbox.height = 5;
|
||||
|
||||
s = ctrl_getset(b, "Connection/SSH/Kex", "repeat",
|
||||
"Options controlling key re-exchange");
|
||||
s = ctrl_getset(b, "Connection/SSH/Kex", "repeat",
|
||||
"Options controlling key re-exchange");
|
||||
|
||||
ctrl_editbox(s, "Max minutes before rekey (0 for no limit)", 't', 20,
|
||||
HELPCTX(ssh_kex_repeat),
|
||||
dlg_stdeditbox_handler,
|
||||
I(offsetof(Config,ssh_rekey_time)),
|
||||
I(-1));
|
||||
ctrl_editbox(s, "Max data before rekey (0 for no limit)", 'x', 20,
|
||||
HELPCTX(ssh_kex_repeat),
|
||||
dlg_stdeditbox_handler,
|
||||
I(offsetof(Config,ssh_rekey_data)),
|
||||
I(16));
|
||||
ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)",
|
||||
HELPCTX(ssh_kex_repeat));
|
||||
ctrl_editbox(s, "Max minutes before rekey (0 for no limit)", 't', 20,
|
||||
HELPCTX(ssh_kex_repeat),
|
||||
dlg_stdeditbox_handler,
|
||||
I(offsetof(Config,ssh_rekey_time)),
|
||||
I(-1));
|
||||
ctrl_editbox(s, "Max data before rekey (0 for no limit)", 'x', 20,
|
||||
HELPCTX(ssh_kex_repeat),
|
||||
dlg_stdeditbox_handler,
|
||||
I(offsetof(Config,ssh_rekey_data)),
|
||||
I(16));
|
||||
ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)",
|
||||
HELPCTX(ssh_kex_repeat));
|
||||
}
|
||||
|
||||
if (!midsession) {
|
||||
|
||||
|
Reference in New Issue
Block a user