}
}
+static void kexlist_handler(union control *ctrl, void *dlg,
+ void *data, int event)
+{
+ Config *cfg = (Config *)data;
+ if (event == EVENT_REFRESH) {
+ int i;
+
+ static const struct { char *s; int k; } kexes[] = {
+ { "Diffie-Hellman group 1", KEX_DHGROUP1 },
+ { "Diffie-Hellman group 14", KEX_DHGROUP14 },
+ { "Diffie-Hellman group exchange", KEX_DHGEX },
+ { "-- warn below here --", KEX_WARN }
+ };
+
+ /* Set up the "kex preference" box. */
+ /* (kexlist assumed to contain all algorithms) */
+ dlg_update_start(ctrl, dlg);
+ dlg_listbox_clear(ctrl, dlg);
+ for (i = 0; i < KEX_MAX; i++) {
+ int k = cfg->ssh_kexlist[i];
+ int j;
+ char *kstr = NULL;
+ for (j = 0; j < (sizeof kexes) / (sizeof kexes[0]); j++) {
+ if (kexes[j].k == k) {
+ kstr = kexes[j].s;
+ break;
+ }
+ }
+ dlg_listbox_addwithid(ctrl, dlg, kstr, k);
+ }
+ dlg_update_done(ctrl, dlg);
+
+ } else if (event == EVENT_VALCHANGE) {
+ int i;
+
+ /* Update array to match the list box. */
+ for (i=0; i < KEX_MAX; i++)
+ cfg->ssh_kexlist[i] = dlg_listbox_getid(ctrl, dlg, i);
+
+ }
+}
+
static void printerbox_handler(union control *ctrl, void *dlg,
void *data, int event)
{
dlg_end(dlg, 1);
} else
dlg_beep(dlg);
+ return;
}
/*
"Always overwrite it", I(LGXF_OVR),
"Always append to the end of it", I(LGXF_APN),
"Ask the user every time", I(LGXF_ASK), NULL);
+ ctrl_checkbox(s, "Flush log file frequently", 'u',
+ HELPCTX(logging_flush),
+ dlg_stdcheckbox_handler, I(offsetof(Config,logflush)));
+
+ if ((midsession && protocol == PROT_SSH) ||
+ (!midsession && backends[3].name != NULL)) {
+ s = ctrl_getset(b, "Session/Logging", "ssh",
+ "Options specific to SSH packet logging");
+ ctrl_checkbox(s, "Omit known password fields", 'k',
+ HELPCTX(logging_ssh_omit_password),
+ dlg_stdcheckbox_handler, I(offsetof(Config,logomitpass)));
+ ctrl_checkbox(s, "Omit session data", 'd',
+ HELPCTX(logging_ssh_omit_data),
+ dlg_stdcheckbox_handler, I(offsetof(Config,logomitdata)));
+ }
/*
* The Terminal panel.
'r', HELPCTX(features_charset), dlg_stdcheckbox_handler,
I(offsetof(Config,no_remote_charset)));
ctrl_checkbox(s, "Disable Arabic text shaping",
- 'l', HELPCTX(no_help), dlg_stdcheckbox_handler,
+ 'l', HELPCTX(features_arabicshaping), dlg_stdcheckbox_handler,
I(offsetof(Config, arabicshaping)));
ctrl_checkbox(s, "Disable bidirectional text display",
- 'j', HELPCTX(no_help), dlg_stdcheckbox_handler,
+ 'd', HELPCTX(features_bidi), dlg_stdcheckbox_handler,
I(offsetof(Config, bidi)));
/*
s = ctrl_getset(b, "Window/Colours", "general",
"General options for colour usage");
+ ctrl_checkbox(s, "Allow terminal to specify ANSI colours", 'i',
+ HELPCTX(colours_ansi),
+ dlg_stdcheckbox_handler, I(offsetof(Config,ansi_colour)));
+ ctrl_checkbox(s, "Allow terminal to use xterm 256-colour mode", '2',
+ HELPCTX(colours_xterm256), dlg_stdcheckbox_handler,
+ I(offsetof(Config,xterm_256_colour)));
ctrl_checkbox(s, "Bolded text is a different colour", 'b',
HELPCTX(colours_bold),
dlg_stdcheckbox_handler, I(offsetof(Config,bold_colour)));
HELPCTX(connection_username),
dlg_stdeditbox_handler, I(offsetof(Config,username)),
I(sizeof(((Config *)0)->username)));
+
+ ctrl_text(s, "Environment variables:", HELPCTX(telnet_environ));
+ ctrl_columns(s, 2, 80, 20);
+ ed = (struct environ_data *)
+ ctrl_alloc(b, sizeof(struct environ_data));
+ ed->varbox = ctrl_editbox(s, "Variable", 'v', 60,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed), P(NULL));
+ ed->varbox->generic.column = 0;
+ ed->valbox = ctrl_editbox(s, "Value", 'l', 60,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed), P(NULL));
+ ed->valbox->generic.column = 0;
+ ed->addbutton = ctrl_pushbutton(s, "Add", 'd',
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->addbutton->generic.column = 1;
+ ed->rembutton = ctrl_pushbutton(s, "Remove", 'r',
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->rembutton->generic.column = 1;
+ ctrl_columns(s, 1, 100);
+ ed->listbox = ctrl_listbox(s, NULL, NO_SHORTCUT,
+ HELPCTX(telnet_environ),
+ environ_handler, P(ed));
+ ed->listbox->listbox.height = 3;
+ ed->listbox->listbox.ncols = 2;
+ ed->listbox->listbox.percentages = snewn(2, int);
+ ed->listbox->listbox.percentages[0] = 30;
+ ed->listbox->listbox.percentages[1] = 70;
}
s = ctrl_getset(b, "Connection", "keepalive",
'n', HELPCTX(connection_nodelay),
dlg_stdcheckbox_handler,
I(offsetof(Config,tcp_nodelay)));
+ ctrl_checkbox(s, "Enable TCP keepalives (SO_KEEPALIVE option)",
+ 'p', HELPCTX(connection_tcpkeepalive),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,tcp_keepalives)));
}
}
ctrl_settitle(b, "Connection/Telnet",
"Options controlling Telnet connections");
- if (!midsession) {
- s = ctrl_getset(b, "Connection/Telnet", "data",
- "Data to send to the server");
- ctrl_text(s, "Environment variables:", HELPCTX(telnet_environ));
- ctrl_columns(s, 2, 80, 20);
- ed = (struct environ_data *)
- ctrl_alloc(b, sizeof(struct environ_data));
- ed->varbox = ctrl_editbox(s, "Variable", 'v', 60,
- HELPCTX(telnet_environ),
- environ_handler, P(ed), P(NULL));
- ed->varbox->generic.column = 0;
- ed->valbox = ctrl_editbox(s, "Value", 'l', 60,
- HELPCTX(telnet_environ),
- environ_handler, P(ed), P(NULL));
- ed->valbox->generic.column = 0;
- ed->addbutton = ctrl_pushbutton(s, "Add", 'd',
- HELPCTX(telnet_environ),
- environ_handler, P(ed));
- ed->addbutton->generic.column = 1;
- ed->rembutton = ctrl_pushbutton(s, "Remove", 'r',
- HELPCTX(telnet_environ),
- environ_handler, P(ed));
- ed->rembutton->generic.column = 1;
- ctrl_columns(s, 1, 100);
- ed->listbox = ctrl_listbox(s, NULL, NO_SHORTCUT,
- HELPCTX(telnet_environ),
- environ_handler, P(ed));
- ed->listbox->listbox.height = 3;
- ed->listbox->listbox.ncols = 2;
- ed->listbox->listbox.percentages = snewn(2, int);
- ed->listbox->listbox.percentages[0] = 30;
- ed->listbox->listbox.percentages[1] = 70;
- }
-
s = ctrl_getset(b, "Connection/Telnet", "protocol",
"Telnet protocol adjustments");
I(offsetof(Config, passive_telnet)),
"Passive", I(1), "Active", I(0), NULL);
}
- ctrl_checkbox(s, "Keyboard sends telnet Backspace and Interrupt", 'k',
+ ctrl_checkbox(s, "Keyboard sends Telnet special commands", 'k',
HELPCTX(telnet_specialkeys),
dlg_stdcheckbox_handler,
I(offsetof(Config,telnet_keyboard)));
- ctrl_checkbox(s, "Return key sends telnet New Line instead of ^M",
- NO_SHORTCUT, HELPCTX(telnet_newline),
+ ctrl_checkbox(s, "Return key sends Telnet New Line instead of ^M",
+ 'm', HELPCTX(telnet_newline),
dlg_stdcheckbox_handler,
I(offsetof(Config,telnet_newline)));
}
HELPCTX(ssh_nopty),
dlg_stdcheckbox_handler,
I(offsetof(Config,nopty)));
+ ctrl_checkbox(s, "Don't start a shell or command at all", 'n',
+ HELPCTX(ssh_noshell),
+ dlg_stdcheckbox_handler,
+ I(offsetof(Config,ssh_no_shell)));
ctrl_checkbox(s, "Enable compression", 'e',
HELPCTX(ssh_compress),
dlg_stdcheckbox_handler,
"1 only", 'l', I(0),
"1", '1', I(1),
"2", '2', I(2),
- "2 only", 'n', I(3), NULL);
+ "2 only", 'y', I(3), NULL);
s = ctrl_getset(b, "Connection/SSH", "encryption", "Encryption options");
c = ctrl_draglist(s, "Encryption cipher selection policy:", 's',
I(offsetof(Config,ssh2_des_cbc)));
/*
+ * The Connection/SSH/Kex panel.
+ */
+ 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;
+
+#if 0
+ s = ctrl_getset(b, "Connection/SSH/Kex", "repeat",
+ "Options controlling key re-exchange");
+ /* FIXME: at least time and data size */
+#endif
+
+ /*
* The Connection/SSH/Auth panel.
*/
ctrl_settitle(b, "Connection/SSH/Auth",
ctrl_droplist(s, "Requires padding on SSH2 RSA signatures", 'p', 20,
HELPCTX(ssh_bugs_rsapad2),
sshbug_handler, I(offsetof(Config,sshbug_rsapad2)));
- ctrl_droplist(s, "Chokes on Diffie-Hellman group exchange", 'd', 20,
- HELPCTX(ssh_bugs_dhgex2),
- sshbug_handler, I(offsetof(Config,sshbug_dhgex2)));
ctrl_droplist(s, "Misuses the session ID in PK auth", 'n', 20,
HELPCTX(ssh_bugs_pksessid2),
sshbug_handler, I(offsetof(Config,sshbug_pksessid2)));