X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7cca0d811c4d1b5bb346cd60fdfa461a558aefec..09798031be7e32fec05058a4ab56b59688ce1aa4:/windlg.c diff --git a/windlg.c b/windlg.c index f6c342ed..41951f97 100644 --- a/windlg.c +++ b/windlg.c @@ -149,9 +149,12 @@ static void save_settings (char *section, int do_host) { } wpps (sesskey, "UserName", cfg.username); wppi (sesskey, "NoPTY", cfg.nopty); + wppi (sesskey, "AgentFwd", cfg.agentfwd); + wpps (sesskey, "RemoteCmd", cfg.remote_cmd); wpps (sesskey, "Cipher", cfg.cipher == CIPHER_BLOWFISH ? "blowfish" : cfg.cipher == CIPHER_DES ? "des" : "3des"); wppi (sesskey, "AuthTIS", cfg.try_tis_auth); + wppi (sesskey, "SshProt", cfg.sshprot); wpps (sesskey, "PublicKeyFile", cfg.keyfile); wppi (sesskey, "RFCEnviron", cfg.rfc_environ); wppi (sesskey, "BackspaceIsDelete", cfg.bksp_is_delete); @@ -283,6 +286,8 @@ static void load_settings (char *section, int do_host) { } gpps (sesskey, "UserName", "", cfg.username, sizeof(cfg.username)); gppi (sesskey, "NoPTY", 0, &cfg.nopty); + gppi (sesskey, "AgentFwd", 0, &cfg.agentfwd); + gpps (sesskey, "RemoteCmd", "", cfg.remote_cmd, sizeof(cfg.remote_cmd)); { char cipher[10]; gpps (sesskey, "Cipher", "3des", cipher, 10); @@ -293,6 +298,7 @@ static void load_settings (char *section, int do_host) { else cfg.cipher = CIPHER_3DES; } + gppi (sesskey, "SshProt", 1, &cfg.sshprot); gppi (sesskey, "AuthTIS", 0, &cfg.try_tis_auth); gpps (sesskey, "PublicKeyFile", "", cfg.keyfile, sizeof(cfg.keyfile)); gppi (sesskey, "RFCEnviron", 0, &cfg.rfc_environ); @@ -1005,11 +1011,13 @@ static int CALLBACK SshProc (HWND hwnd, UINT msg, SetDlgItemText (hwnd, IDC3_TTEDIT, cfg.termtype); SetDlgItemText (hwnd, IDC3_LOGEDIT, cfg.username); CheckDlgButton (hwnd, IDC3_NOPTY, cfg.nopty); + CheckDlgButton (hwnd, IDC3_AGENTFWD, cfg.agentfwd); CheckRadioButton (hwnd, IDC3_CIPHER3DES, IDC3_CIPHERDES, cfg.cipher == CIPHER_BLOWFISH ? IDC3_CIPHERBLOWF : cfg.cipher == CIPHER_DES ? IDC3_CIPHERDES : - IDC3_CIPHER3DES); + CheckRadioButton (hwnd, IDC3_SSHPROT1, IDC3_SSHPROT2, + cfg.sshprot == 1 ? IDC3_SSHPROT1 : IDC3_SSHPROT2); CheckDlgButton (hwnd, IDC3_AUTHTIS, cfg.try_tis_auth); SetDlgItemText (hwnd, IDC3_PKEDIT, cfg.keyfile); break; @@ -1030,6 +1038,11 @@ static int CALLBACK SshProc (HWND hwnd, UINT msg, HIWORD(wParam) == BN_DOUBLECLICKED) cfg.nopty = IsDlgButtonChecked (hwnd, IDC3_NOPTY); break; + case IDC3_AGENTFWD: + if (HIWORD(wParam) == BN_CLICKED || + HIWORD(wParam) == BN_DOUBLECLICKED) + cfg.agentfwd = IsDlgButtonChecked (hwnd, IDC3_AGENTFWD); + break; case IDC3_CIPHER3DES: case IDC3_CIPHERBLOWF: case IDC3_CIPHERDES: @@ -1043,6 +1056,16 @@ static int CALLBACK SshProc (HWND hwnd, UINT msg, cfg.cipher = CIPHER_DES; } break; + case IDC3_SSHPROT1: + case IDC3_SSHPROT2: + if (HIWORD(wParam) == BN_CLICKED || + HIWORD(wParam) == BN_DOUBLECLICKED) { + if (IsDlgButtonChecked (hwnd, IDC3_SSHPROT1)) + cfg.sshprot = 1; + else if (IsDlgButtonChecked (hwnd, IDC3_SSHPROT2)) + cfg.sshprot = 2; + } + break; case IDC3_AUTHTIS: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED)