Servers announcing themselves as `Sun_SSH_1.0' apparently cannot
[u/mdw/putty] / config.c
index e269e1f..2e3822a 100644 (file)
--- a/config.c
+++ b/config.c
@@ -868,6 +868,7 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
      * The Load/Save panel is available even in mid-session.
      */
     s = ctrl_getset(b, "Session", "savedsessions",
+                   midsession ? "Save the current session settings" :
                    "Load, save or delete a stored session");
     ctrl_columns(s, 2, 75, 25);
     ssd->sesslist = sesslist;
@@ -1377,23 +1378,18 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
                          'p', HELPCTX(connection_tcpkeepalive),
                          dlg_stdcheckbox_handler,
                          I(offsetof(Config,tcp_keepalives)));
+#ifndef NO_IPV6
            s = ctrl_getset(b, "Connection", "ipversion",
                          "Internet protocol version");
-           ctrl_radiobuttons(s, NULL, NO_SHORTCUT,
-#ifndef NO_IPV6
-                         3,
-#else
-                         2,
-#endif
+           ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3,
                          HELPCTX(connection_ipversion),
                          dlg_stdradiobutton_handler,
                          I(offsetof(Config, addressfamily)),
                          "Auto", NO_SHORTCUT, I(ADDRTYPE_UNSPEC),
                          "IPv4", NO_SHORTCUT, I(ADDRTYPE_IPV4),
-#ifndef NO_IPV6
                          "IPv6", NO_SHORTCUT, I(ADDRTYPE_IPV6),
-#endif
                          NULL);
+#endif
        }
 
        /*
@@ -1589,7 +1585,7 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
        ctrl_settitle(b, "Connection/SSH",
                      "Options controlling SSH connections");
 
-       if (midsession) {
+       if (midsession && 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 "
@@ -1614,10 +1610,20 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
                          HELPCTX(ssh_noshell),
                          dlg_stdcheckbox_handler,
                          I(offsetof(Config,ssh_no_shell)));
+       }
+
+       if (!midsession || protcfginfo != 1) {
+           s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options");
+
            ctrl_checkbox(s, "Enable compression", 'e',
                          HELPCTX(ssh_compress),
                          dlg_stdcheckbox_handler,
                          I(offsetof(Config,compression)));
+       }
+
+       if (!midsession) {
+           s = ctrl_getset(b, "Connection/SSH", "protocol", "Protocol options");
+
            ctrl_radiobuttons(s, "Preferred SSH protocol version:", NO_SHORTCUT, 4,
                              HELPCTX(ssh_protocol),
                              dlg_stdradiobutton_handler,
@@ -1626,7 +1632,9 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
                              "1", '1', I(1),
                              "2", '2', I(2),
                              "2 only", 'y', I(3), NULL);
+       }
 
+       if (!midsession || protcfginfo != 1) {
            s = ctrl_getset(b, "Connection/SSH", "encryption", "Encryption options");
            c = ctrl_draglist(s, "Encryption cipher selection policy:", 's',
                              HELPCTX(ssh_ciphers),
@@ -1650,7 +1658,7 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
 
            s = ctrl_getset(b, "Connection/SSH/Kex", "main",
                            "Key exchange algorithm options");
-           c = ctrl_draglist(s, "Algorithm selection policy", 's',
+           c = ctrl_draglist(s, "Algorithm selection policy:", 's',
                              HELPCTX(ssh_kexlist),
                              kexlist_handler, P(NULL));
            c->listbox.height = 5;
@@ -1788,21 +1796,16 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
                                           "Remote", 'm', P(NULL),
                                           "Dynamic", 'y', P(NULL),
                                           NULL);
-       pfd->addressfamily =
-           ctrl_radiobuttons(s, NULL, NO_SHORTCUT,
 #ifndef NO_IPV6
-                             3,
-#else
-                             2,
-#endif
+       pfd->addressfamily =
+           ctrl_radiobuttons(s, NULL, NO_SHORTCUT, 3,
                              HELPCTX(ssh_tunnels_portfwd_ipversion),
                              portfwd_handler, P(pfd),
                              "Auto", NO_SHORTCUT, I(ADDRTYPE_UNSPEC),
                              "IPv4", NO_SHORTCUT, I(ADDRTYPE_IPV4),
-#ifndef NO_IPV6
                              "IPv6", NO_SHORTCUT, I(ADDRTYPE_IPV6),
-#endif
                              NULL);
+#endif
        ctrl_tabdelay(s, pfd->addbutton);
        ctrl_columns(s, 1, 100);
 
@@ -1836,6 +1839,9 @@ void setup_config_box(struct controlbox *b, struct sesslist *sesslist,
            ctrl_droplist(s, "Misuses the session ID in PK auth", 'n', 20,
                          HELPCTX(ssh_bugs_pksessid2),
                          sshbug_handler, I(offsetof(Config,sshbug_pksessid2)));
+           ctrl_droplist(s, "Ignores key re-exchange completely", 'k', 20,
+                         HELPCTX(ssh_bugs_rekey2),
+                         sshbug_handler, I(offsetof(Config,sshbug_rekey2)));
        }
     }
 }