From cb4d47685790af5ccbca174a58c4f0d01a77860f Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 29 Nov 2001 23:58:02 +0000 Subject: [PATCH] Oops - check the _rest_ of the SSH2 DES patch back in. D'oh! git-svn-id: svn://svn.tartarus.org/sgt/putty@1431 cda61777-01e9-0310-a592-d414129be87e --- putty.h | 1 + settings.c | 2 ++ windlg.c | 12 +++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/putty.h b/putty.h index 352a4ef3..25ea69e2 100644 --- a/putty.h +++ b/putty.h @@ -252,6 +252,7 @@ typedef struct { char keyfile[FILENAME_MAX]; int sshprot; /* use v1 or v2 when both available */ int buggymac; /* MAC bug commmercial <=v2.3.x SSH2 */ + int ssh2_des_cbc; /* "des-cbc" nonstandard SSH2 cipher */ int try_tis_auth; int try_ki_auth; int ssh_subsys; /* run a subsystem rather than a command */ diff --git a/settings.c b/settings.c index 24d6aeb5..01fd312d 100644 --- a/settings.c +++ b/settings.c @@ -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, "SshProt", cfg->sshprot); 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, "RemoteCommand", cfg->remote_cmd); 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); gppi(sesskey, "SshProt", 1, &cfg->sshprot); gppi(sesskey, "BuggyMAC", 0, &cfg->buggymac); + gppi(sesskey, "SSH2DES", 0, &cfg->ssh2_des_cbc); gppi(sesskey, "AuthTIS", 0, &cfg->try_tis_auth); gppi(sesskey, "AuthKI", 1, &cfg->try_ki_auth); gpps(sesskey, "PublicKeyFile", "", cfg->keyfile, sizeof(cfg->keyfile)); diff --git a/windlg.c b/windlg.c index f3084ce2..cb7500cf 100644 --- a/windlg.c +++ b/windlg.c @@ -459,6 +459,7 @@ enum { IDCX_ABOUT = IDC_CIPHERUP, IDC_CIPHERDN, IDC_BUGGYMAC, + IDC_SSH2DES, IDC_SSHPROTSTATIC, IDC_SSHPROT1, IDC_SSHPROT2, @@ -740,6 +741,7 @@ static void init_dlg_ctrls(HWND hwnd, int keepsess) CheckDlgButton(hwnd, IDC_NOPTY, cfg.nopty); CheckDlgButton(hwnd, IDC_COMPRESS, cfg.compression); CheckDlgButton(hwnd, IDC_BUGGYMAC, cfg.buggymac); + CheckDlgButton(hwnd, IDC_SSH2DES, cfg.ssh2_des_cbc); CheckDlgButton(hwnd, IDC_AGENTFWD, cfg.agentfwd); CheckRadioButton(hwnd, 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) { - /* The SSH panel. Accelerators used: [acgo] r pe12i s */ + /* The SSH panel. Accelerators used: [acgo] r pe12i sd */ struct ctlpos cp; ctlposinit(&cp, hwnd, 80, 3, 13); if (dlgtype == 0) { @@ -1329,6 +1331,8 @@ static void create_controls(HWND hwnd, int dlgtype, int panel) prefslist(&cipherlist, &cp, "Encryption cipher &selection policy:", IDC_CIPHERSTATIC2, IDC_CIPHERLIST, IDC_CIPHERUP, IDC_CIPHERDN); + checkbox(&cp, "Enable non-standard use of single-&DES in SSH 2", + IDC_SSH2DES); endbox(&cp); } } @@ -2392,6 +2396,12 @@ static int GenericMainDlgProc(HWND hwnd, UINT msg, cfg.buggymac = IsDlgButtonChecked(hwnd, IDC_BUGGYMAC); 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: if (HIWORD(wParam) == BN_CLICKED || HIWORD(wParam) == BN_DOUBLECLICKED) -- 2.11.0