X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c6ccd5c22a25aca610b0120b3eec1e6efd1aab97..973612f5e86c9eaabc812a47d81c5cb14f672249:/config.c diff --git a/config.c b/config.c index 71d3ac05..c844e059 100644 --- a/config.c +++ b/config.c @@ -350,9 +350,25 @@ static void sessionsaver_handler(union control *ctrl, void *dlg, dlg_update_done(ctrl, dlg); } } else if (event == EVENT_VALCHANGE) { + int top, bottom, halfway, i; if (ctrl == ssd->editbox) { dlg_editbox_get(ctrl, dlg, savedsession, SAVEDSESSION_LEN); + top = ssd->sesslist.nsessions; + bottom = -1; + while (top-bottom > 1) { + halfway = (top+bottom)/2; + i = strcmp(savedsession, ssd->sesslist.sessions[halfway]); + if (i <= 0 ) { + top = halfway; + } else { + bottom = halfway; + } + } + if (top == ssd->sesslist.nsessions) { + top -= 1; + } + dlg_listbox_select(ssd->listbox, dlg, top); } } else if (event == EVENT_ACTION) { if (!ssd->midsession && @@ -1817,8 +1833,18 @@ void setup_config_box(struct controlbox *b, int midsession, ctrl_settitle(b, "Connection/SSH/Auth", "Options controlling SSH authentication"); + s = ctrl_getset(b, "Connection/SSH/Auth", "main", NULL); + ctrl_checkbox(s, "Bypass authentication entirely (SSH-2 only)", 'b', + HELPCTX(ssh_auth_bypass), + dlg_stdcheckbox_handler, + I(offsetof(Config,ssh_no_userauth))); + s = ctrl_getset(b, "Connection/SSH/Auth", "methods", "Authentication methods"); + ctrl_checkbox(s, "Attempt authentication using Pageant", 'p', + HELPCTX(ssh_auth_pageant), + dlg_stdcheckbox_handler, + I(offsetof(Config,tryagent))); ctrl_checkbox(s, "Attempt TIS or CryptoCard auth (SSH-1)", 'm', HELPCTX(ssh_auth_tis), dlg_stdcheckbox_handler,