X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=config.c;h=0d292b8af4ff64c6606de8639b768b869fba9858;hb=5904545cc18289541702da284b00490cb25a753e;hp=bfa9071bcfc54d29ca6051060e04c526a72e86ac;hpb=70ab076d839072357dab75590287d44961302de8;p=PuTTY.git diff --git a/config.c b/config.c index bfa9071b..0d292b8a 100644 --- a/config.c +++ b/config.c @@ -433,6 +433,7 @@ static void kexlist_handler(union control *ctrl, void *dlg, { "Diffie-Hellman group 14", KEX_DHGROUP14 }, { "Diffie-Hellman group exchange", KEX_DHGEX }, { "RSA-based key exchange", KEX_RSA }, + { "ECDH key exchange", KEX_ECDH }, { "-- warn below here --", KEX_WARN } }; @@ -2136,7 +2137,8 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_settitle(b, "Connection/SSH", "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); ctrl_text(s, "Nothing on this panel may be reconfigured in mid-" "session; it is only here so that sub-panels of it can " @@ -2158,7 +2160,7 @@ void setup_config_box(struct controlbox *b, int midsession, I(CONF_ssh_no_shell)); } - if (!midsession || protcfginfo != 1) { + if (!midsession || !(protcfginfo == 1 || protcfginfo == -1)) { s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options"); ctrl_checkbox(s, "Enable compression", 'e', @@ -2167,7 +2169,7 @@ void setup_config_box(struct controlbox *b, int midsession, I(CONF_compression)); } - if (!midsession || protcfginfo != 1) { + if (!midsession) { s = ctrl_getset(b, "Connection/SSH", "sharing", "Sharing an SSH connection between PuTTY tools"); ctrl_checkbox(s, "Share SSH connections if possible", 's', @@ -2202,10 +2204,11 @@ void setup_config_box(struct controlbox *b, int midsession, /* * The Connection/SSH/Kex panel. (Owing to repeat key - * exchange, this is all meaningful in mid-session _if_ - * we're using SSH-2 or haven't decided yet.) + * exchange, much of this is meaningful in mid-session _if_ + * 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", "Options controlling SSH key exchange"); @@ -2231,7 +2234,14 @@ void setup_config_box(struct controlbox *b, int midsession, I(16)); ctrl_text(s, "(Use 1M for 1 megabyte, 1G for 1 gigabyte etc)", 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", "Manually configure host keys for this connection"); @@ -2269,7 +2279,7 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_columns(s, 1, 100); } - if (!midsession || protcfginfo != 1) { + if (!midsession || !(protcfginfo == 1 || protcfginfo == -1)) { /* * The Connection/SSH/Cipher panel. */ @@ -2594,8 +2604,8 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_droplist(s, "Ignores SSH-2 maximum packet size", 'x', 20, HELPCTX(ssh_bugs_maxpkt2), sshbug_handler, I(CONF_sshbug_maxpkt2)); - ctrl_droplist(s, "Replies to channel requests after channel close", - 'q', 20, HELPCTX(ssh_bugs_chanreq), + ctrl_droplist(s, "Replies to requests on closed channels", 'q', 20, + HELPCTX(ssh_bugs_chanreq), sshbug_handler, I(CONF_sshbug_chanreq)); } }