X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=config.c;h=53ad2f910e24a340a2e325a814a0296938be39c7;hb=2eb952ca31aa13d1f6f429305fbb6f43a9a28c56;hp=a134e326c4f9c0ef4b1d8b636d81bdf46498061c;hpb=f4956a1f9dc66973c1a9c9196ef893412b2545d7;p=PuTTY.git diff --git a/config.c b/config.c index a134e326..53ad2f91 100644 --- a/config.c +++ b/config.c @@ -356,7 +356,8 @@ static void cipherlist_handler(union control *ctrl, void *dlg, if (event == EVENT_REFRESH) { int i; - static const struct { char *s; int c; } ciphers[] = { + static const struct { const char *s; int c; } ciphers[] = { + { "ChaCha20 (SSH-2 only)", CIPHER_CHACHA20 }, { "3DES", CIPHER_3DES }, { "Blowfish", CIPHER_BLOWFISH }, { "DES", CIPHER_DES }, @@ -372,7 +373,7 @@ static void cipherlist_handler(union control *ctrl, void *dlg, for (i = 0; i < CIPHER_MAX; i++) { int c = conf_get_int_int(conf, CONF_ssh_cipherlist, i); int j; - char *cstr = NULL; + const char *cstr = NULL; for (j = 0; j < (sizeof ciphers) / (sizeof ciphers[0]); j++) { if (ciphers[j].c == c) { cstr = ciphers[j].s; @@ -428,7 +429,7 @@ static void kexlist_handler(union control *ctrl, void *dlg, if (event == EVENT_REFRESH) { int i; - static const struct { char *s; int k; } kexes[] = { + static const struct { const char *s; int k; } kexes[] = { { "Diffie-Hellman group 1", KEX_DHGROUP1 }, { "Diffie-Hellman group 14", KEX_DHGROUP14 }, { "Diffie-Hellman group exchange", KEX_DHGEX }, @@ -444,7 +445,7 @@ static void kexlist_handler(union control *ctrl, void *dlg, for (i = 0; i < KEX_MAX; i++) { int k = conf_get_int_int(conf, CONF_ssh_kexlist, i); int j; - char *kstr = NULL; + const char *kstr = NULL; for (j = 0; j < (sizeof kexes) / (sizeof kexes[0]); j++) { if (kexes[j].k == k) { kstr = kexes[j].s; @@ -472,7 +473,7 @@ static void printerbox_handler(union control *ctrl, void *dlg, if (event == EVENT_REFRESH) { int nprinters, i; printer_enum *pe; - char *printer; + const char *printer; dlg_update_start(ctrl, dlg); /* @@ -1119,7 +1120,8 @@ static void portfwd_handler(union control *ctrl, void *dlg, } } else if (event == EVENT_ACTION) { if (ctrl == pfd->addbutton) { - char *family, *type, *src, *key, *val; + const char *family, *type; + char *src, *key, *val; int whichbutton; #ifndef NO_IPV6 @@ -1178,7 +1180,8 @@ static void portfwd_handler(union control *ctrl, void *dlg, if (i < 0) { dlg_beep(dlg); } else { - char *key, *val, *p; + char *key, *p; + const char *val; key = conf_get_str_nthstrkey(conf, CONF_portfwd, i); if (key) { @@ -1450,7 +1453,7 @@ void setup_config_box(struct controlbox *b, int midsession, * logging can sensibly be available. */ { - char *sshlogname, *sshrawlogname; + const char *sshlogname, *sshrawlogname; if ((midsession && protocol == PROT_SSH) || (!midsession && backend_from_proto(PROT_SSH))) { sshlogname = "SSH packets"; @@ -1475,7 +1478,7 @@ void setup_config_box(struct controlbox *b, int midsession, HELPCTX(logging_filename), conf_filesel_handler, I(CONF_logfilename)); ctrl_text(s, "(Log file name can contain &Y, &M, &D for date," - " &T for time, and &H for host name)", + " &T for time, &H for host name, and &P for port number)", HELPCTX(logging_filename)); ctrl_radiobuttons(s, "What to do if the log file already exists:", 'e', 1, HELPCTX(logging_exists), @@ -1927,7 +1930,7 @@ void setup_config_box(struct controlbox *b, int midsession, #endif { - char *label = backend_from_proto(PROT_SSH) ? + const char *label = backend_from_proto(PROT_SSH) ? "Logical name of remote host (e.g. for SSH key lookup):" : "Logical name of remote host:"; s = ctrl_getset(b, "Connection", "identity", @@ -2069,6 +2072,15 @@ void setup_config_box(struct controlbox *b, int midsession, HELPCTX(proxy_command), conf_editbox_handler, I(CONF_proxy_telnet_command), I(1)); + + ctrl_radiobuttons(s, "Print proxy diagnostics " + "in the terminal window", 'r', 5, + HELPCTX(proxy_main), + conf_radiobutton_handler, + I(CONF_proxy_log_to_term), + "No", I(FORCE_OFF), + "Yes", I(FORCE_ON), + "Only until session starts", I(AUTO), NULL); } /*