Oops - check the _rest_ of the SSH2 DES patch back in. D'oh!
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 29 Nov 2001 23:58:02 +0000 (23:58 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 29 Nov 2001 23:58:02 +0000 (23:58 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@1431 cda61777-01e9-0310-a592-d414129be87e

putty.h
settings.c
windlg.c

diff --git a/putty.h b/putty.h
index 352a4ef..25ea69e 100644 (file)
--- 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 */
index 24d6aeb..01fd312 100644 (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, "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));
index f3084ce..cb7500c 100644 (file)
--- 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)