static struct prefslist cipherlist;
+extern Config cfg; /* defined in window.c */
+
struct sesslist sesslist; /* exported to window.c */
#define PRINTER_DISABLED_STRING "None (printing disabled)"
IDC_X11_FORWARD,
IDC_X11_DISPSTATIC,
IDC_X11_DISPLAY,
+ IDC_X11AUTHSTATIC,
+ IDC_X11MIT,
+ IDC_X11XDM,
IDC_LPORT_ALL,
IDC_RPORT_ALL,
IDC_PFWDSTATIC,
case IDC_X11_DISPSTATIC:
case IDC_X11_DISPLAY:
return "JI(`',`ssh.tunnels.x11')";
+ case IDC_X11AUTHSTATIC:
+ case IDC_X11MIT:
+ case IDC_X11XDM:
+ return "JI(`',`ssh.tunnels.x11auth')";
case IDC_PFWDSTATIC:
case IDC_PFWDSTATIC2:
case IDC_PFWDREMOVE:
CheckDlgButton(hwnd, IDC_X11_FORWARD, cfg.x11_forward);
SetDlgItemText(hwnd, IDC_X11_DISPLAY, cfg.x11_display);
+ CheckRadioButton(hwnd, IDC_X11MIT, IDC_X11XDM,
+ cfg.x11_auth == X11_MIT ? IDC_X11MIT : IDC_X11XDM);
CheckDlgButton(hwnd, IDC_LPORT_ALL, cfg.lport_acceptall);
CheckDlgButton(hwnd, IDC_RPORT_ALL, cfg.rport_acceptall);
IDC_TITLE_TUNNELS);
beginbox(&cp, "X11 forwarding", IDC_BOX_TUNNELS1);
checkbox(&cp, "&Enable X11 forwarding", IDC_X11_FORWARD);
- multiedit(&cp, "&X display location", IDC_X11_DISPSTATIC,
- IDC_X11_DISPLAY, 50, NULL);
+ staticedit(&cp, "&X display location", IDC_X11_DISPSTATIC,
+ IDC_X11_DISPLAY, 50);
+ radioline(&cp, "Remote X11 a&uthentication protocol",
+ IDC_X11AUTHSTATIC, 2,
+ "MIT-Magic-Cookie-1", IDC_X11MIT,
+ "XDM-Authorization-1", IDC_X11XDM, NULL);
endbox(&cp);
beginbox(&cp, "Port forwarding", IDC_BOX_TUNNELS2);
checkbox(&cp, "Local ports accept connections from o&ther hosts",
of.lStructSize = sizeof(of);
#endif
of.hwndOwner = hwnd;
- of.lpstrFilter = "PuTTY Private Key Files\0*.PPK\0"
+ of.lpstrFilter = "PuTTY Private Key Files (*.ppk)\0*.PPK\0"
"AllFiles\0*\0\0\0";
of.lpstrCustomFilter = NULL;
of.nFilterIndex = 1;
GetDlgItemText(hwnd, IDC_X11_DISPLAY, cfg.x11_display,
sizeof(cfg.x11_display) - 1);
break;
+ case IDC_X11MIT:
+ case IDC_X11XDM:
+ if (HIWORD(wParam) == BN_CLICKED ||
+ HIWORD(wParam) == BN_DOUBLECLICKED) {
+ if (IsDlgButtonChecked(hwnd, IDC_X11MIT))
+ cfg.x11_auth = X11_MIT;
+ else if (IsDlgButtonChecked(hwnd, IDC_X11XDM))
+ cfg.x11_auth = X11_XDM;
+ }
+ break;
case IDC_PFWDADD:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED) {
"or Cancel to disable logging.";
char message[sizeof(msgtemplate) + FILENAME_MAX];
int mbret;
- if (cfg.logxfovr != LGXF_ASK) {
- return ((cfg.logxfovr == LGXF_OVR) ? 2 : 1);
- }
+
sprintf(message, msgtemplate, FILENAME_MAX, filename);
mbret = MessageBox(NULL, message, mbtitle,