1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-19 03:58:05 -05:00

Oops - check the _rest_ of the SSH2 DES patch back in. D'oh!

[originally from svn r1431]
This commit is contained in:
Simon Tatham 2001-11-29 23:58:02 +00:00
parent f391d066de
commit b9c8a9270a
3 changed files with 14 additions and 1 deletions

View File

@ -252,6 +252,7 @@ typedef struct {
char keyfile[FILENAME_MAX]; char keyfile[FILENAME_MAX];
int sshprot; /* use v1 or v2 when both available */ int sshprot; /* use v1 or v2 when both available */
int buggymac; /* MAC bug commmercial <=v2.3.x SSH2 */ int buggymac; /* MAC bug commmercial <=v2.3.x SSH2 */
int ssh2_des_cbc; /* "des-cbc" nonstandard SSH2 cipher */
int try_tis_auth; int try_tis_auth;
int try_ki_auth; int try_ki_auth;
int ssh_subsys; /* run a subsystem rather than a command */ int ssh_subsys; /* run a subsystem rather than a command */

View File

@ -178,6 +178,7 @@ void save_settings(char *section, int do_host, Config * cfg)
write_setting_i(sesskey, "AuthKI", cfg->try_ki_auth); write_setting_i(sesskey, "AuthKI", cfg->try_ki_auth);
write_setting_i(sesskey, "SshProt", cfg->sshprot); write_setting_i(sesskey, "SshProt", cfg->sshprot);
write_setting_i(sesskey, "BuggyMAC", cfg->buggymac); write_setting_i(sesskey, "BuggyMAC", cfg->buggymac);
write_setting_i(sesskey, "SSH2DES", cfg->ssh2_des_cbc);
write_setting_s(sesskey, "PublicKeyFile", cfg->keyfile); write_setting_s(sesskey, "PublicKeyFile", cfg->keyfile);
write_setting_s(sesskey, "RemoteCommand", cfg->remote_cmd); write_setting_s(sesskey, "RemoteCommand", cfg->remote_cmd);
write_setting_i(sesskey, "RFCEnviron", cfg->rfc_environ); write_setting_i(sesskey, "RFCEnviron", cfg->rfc_environ);
@ -362,6 +363,7 @@ void load_settings(char *section, int do_host, Config * cfg)
ciphernames, CIPHER_MAX, cfg->ssh_cipherlist); ciphernames, CIPHER_MAX, cfg->ssh_cipherlist);
gppi(sesskey, "SshProt", 1, &cfg->sshprot); gppi(sesskey, "SshProt", 1, &cfg->sshprot);
gppi(sesskey, "BuggyMAC", 0, &cfg->buggymac); gppi(sesskey, "BuggyMAC", 0, &cfg->buggymac);
gppi(sesskey, "SSH2DES", 0, &cfg->ssh2_des_cbc);
gppi(sesskey, "AuthTIS", 0, &cfg->try_tis_auth); gppi(sesskey, "AuthTIS", 0, &cfg->try_tis_auth);
gppi(sesskey, "AuthKI", 1, &cfg->try_ki_auth); gppi(sesskey, "AuthKI", 1, &cfg->try_ki_auth);
gpps(sesskey, "PublicKeyFile", "", cfg->keyfile, sizeof(cfg->keyfile)); gpps(sesskey, "PublicKeyFile", "", cfg->keyfile, sizeof(cfg->keyfile));

View File

@ -459,6 +459,7 @@ enum { IDCX_ABOUT =
IDC_CIPHERUP, IDC_CIPHERUP,
IDC_CIPHERDN, IDC_CIPHERDN,
IDC_BUGGYMAC, IDC_BUGGYMAC,
IDC_SSH2DES,
IDC_SSHPROTSTATIC, IDC_SSHPROTSTATIC,
IDC_SSHPROT1, IDC_SSHPROT1,
IDC_SSHPROT2, IDC_SSHPROT2,
@ -740,6 +741,7 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess)
CheckDlgButton(hwnd, IDC_NOPTY, cfg.nopty); CheckDlgButton(hwnd, IDC_NOPTY, cfg.nopty);
CheckDlgButton(hwnd, IDC_COMPRESS, cfg.compression); CheckDlgButton(hwnd, IDC_COMPRESS, cfg.compression);
CheckDlgButton(hwnd, IDC_BUGGYMAC, cfg.buggymac); CheckDlgButton(hwnd, IDC_BUGGYMAC, cfg.buggymac);
CheckDlgButton(hwnd, IDC_SSH2DES, cfg.ssh2_des_cbc);
CheckDlgButton(hwnd, IDC_AGENTFWD, cfg.agentfwd); CheckDlgButton(hwnd, IDC_AGENTFWD, cfg.agentfwd);
CheckRadioButton(hwnd, IDC_SSHPROT1, IDC_SSHPROT2, CheckRadioButton(hwnd, IDC_SSHPROT1, IDC_SSHPROT2,
cfg.sshprot == 1 ? IDC_SSHPROT1 : IDC_SSHPROT2); cfg.sshprot == 1 ? IDC_SSHPROT1 : IDC_SSHPROT2);
@ -1305,7 +1307,7 @@ static void create_controls(HWND hwnd, int dlgtype, int panel)
} }
if (panel == sshpanelstart) { if (panel == sshpanelstart) {
/* The SSH panel. Accelerators used: [acgo] r pe12i s */ /* The SSH panel. Accelerators used: [acgo] r pe12i sd */
struct ctlpos cp; struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13); ctlposinit(&cp, hwnd, 80, 3, 13);
if (dlgtype == 0) { if (dlgtype == 0) {
@ -1329,6 +1331,8 @@ static void create_controls(HWND hwnd, int dlgtype, int panel)
prefslist(&cipherlist, &cp, "Encryption cipher &selection policy:", prefslist(&cipherlist, &cp, "Encryption cipher &selection policy:",
IDC_CIPHERSTATIC2, IDC_CIPHERLIST, IDC_CIPHERUP, IDC_CIPHERSTATIC2, IDC_CIPHERLIST, IDC_CIPHERUP,
IDC_CIPHERDN); IDC_CIPHERDN);
checkbox(&cp, "Enable non-standard use of single-&DES in SSH 2",
IDC_SSH2DES);
endbox(&cp); endbox(&cp);
} }
} }
@ -2392,6 +2396,12 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg,
cfg.buggymac = cfg.buggymac =
IsDlgButtonChecked(hwnd, IDC_BUGGYMAC); IsDlgButtonChecked(hwnd, IDC_BUGGYMAC);
break; break;
case IDC_SSH2DES:
if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED)
cfg.ssh2_des_cbc =
IsDlgButtonChecked(hwnd, IDC_SSH2DES);
break;
case IDC_AGENTFWD: case IDC_AGENTFWD:
if (HIWORD(wParam) == BN_CLICKED || if (HIWORD(wParam) == BN_CLICKED ||
HIWORD(wParam) == BN_DOUBLECLICKED) HIWORD(wParam) == BN_DOUBLECLICKED)