• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision6715 (tree)
Time2017-05-12 21:41:55
Authordoda

Log Message

不使用のコードを削除

Change Summary

Incremental Difference

--- trunk/ttssh2/ttxssh/ssh.c (revision 6714)
+++ trunk/ttssh2/ttxssh/ssh.c (revision 6715)
@@ -766,13 +766,8 @@
766766 } else {
767767 int already_decrypted = get_predecryption_amount(pvar);
768768
769-#if 0
770769 CRYPT_decrypt(pvar, data + already_decrypted,
771- len - already_decrypted);
772-#else
773- CRYPT_decrypt(pvar, data + already_decrypted,
774770 (4 + len) - already_decrypted);
775-#endif
776771
777772 if (!CRYPT_verify_receiver_MAC
778773 (pvar, pvar->ssh_state.receiver_sequence_number, data, len + 4,
@@ -6396,18 +6391,6 @@
63966391 /* NOT REACHED */
63976392 }
63986393
6399- // この時点でMACや圧縮を有効にするのは間違いだったので削除。(2006.10.30 yutaka)
6400-#if 0
6401- for (mode = 0 ; mode < MODE_MAX ; mode++) {
6402- pvar->ssh2_keys[mode].mac.enabled = 1;
6403- pvar->ssh2_keys[mode].comp.enabled = 1;
6404- }
6405-
6406- // パケット圧縮が有効なら初期化する。(2005.7.9 yutaka)
6407- prep_compression(pvar);
6408- enable_compression(pvar);
6409-#endif
6410-
64116394 // start user authentication
64126395 msg = buffer_init();
64136396 if (msg == NULL) {
--- trunk/ttssh2/ttxssh/ttxssh.c (revision 6714)
+++ trunk/ttssh2/ttxssh/ttxssh.c (revision 6715)
@@ -229,7 +229,6 @@
229229 }
230230 }
231231
232-#if 1
233232 // 指定されていない文字があれば、disabled lineの直前に挿入する。
234233 //
235234 // ex. (Zを挿入する)
@@ -271,17 +270,7 @@
271270 i++;
272271 }
273272 }
274-#else
275- for (j = 0; j < default_strings_len ; j++) {
276- int num = default_strings[j];
277273
278- if (!listed[num]) {
279- buf[i] = num + '0';
280- i++;
281- }
282- }
283-#endif
284-
285274 buf[i] = 0;
286275 }
287276
@@ -293,15 +282,7 @@
293282 {
294283 /* SSH_CIPHER_NONE means that all ciphers below that one are disabled.
295284 We *never* allow no encryption. */
296-#if 0
297285 static char default_strings[] = {
298- SSH_CIPHER_3DES,
299- SSH_CIPHER_NONE,
300- SSH_CIPHER_DES, SSH_CIPHER_BLOWFISH
301- };
302-#else
303- // for SSH2(yutaka)
304- static char default_strings[] = {
305286 SSH2_CIPHER_CAMELLIA256_CTR,
306287 SSH2_CIPHER_AES256_CTR,
307288 SSH2_CIPHER_CAMELLIA256_CBC,
@@ -329,7 +310,6 @@
329310 SSH_CIPHER_DES,
330311 0, 0, 0 // Dummy for SSH_CIPHER_IDEA, SSH_CIPHER_TSS, SSH_CIPHER_RC4
331312 };
332-#endif
333313
334314 normalize_generic_order(buf, default_strings, NUM_ELEM(default_strings));
335315 }
@@ -800,13 +780,8 @@
800780 case AF_INET6:
801781 len = sizeof(struct sockaddr_in6);
802782 ((struct sockaddr_in6 FAR *) &ss)->sin6_family = AF_INET6;
803-#if 0 /* symbol "in6addr_any" is not included in wsock32.lib */
804- /* if wsock32.lib will be linked, we can't refer "in6addr_any" */
805- ((struct sockaddr_in6 FAR *) &ss)->sin6_addr = in6addr_any;
806-#else
807783 memset(&((struct sockaddr_in6 FAR *) &ss)->sin6_addr, 0,
808784 sizeof(struct in_addr6));
809-#endif /* 0 */
810785 ((struct sockaddr_in6 FAR *) &ss)->sin6_port =
811786 htons(find_local_port(pvar));
812787 break;
@@ -899,16 +874,9 @@
899874 }
900875
901876 if (SecureLargeIcon != NULL && SecureSmallIcon != NULL) {
902-#if 0
903- // 大きいアイコンは WNDCLASS にセットしているので取り出し方が違う (2006.8.10 maya)
904877 pvar->OldLargeIcon =
905- (HICON) GetClassLong(pvar->NotificationWindow, GCL_HICON);
906-#else
907- // Tera Term 側が WM_SETICON するようになったので普通に取り出す (2009.6.9 maya)
908- pvar->OldLargeIcon =
909878 (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
910879 ICON_BIG, 0);
911-#endif
912880 pvar->OldSmallIcon =
913881 (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
914882 ICON_SMALL, 0);
@@ -1630,15 +1598,7 @@
16301598 GetDlgItemText(dlg, IDC_HOSTCOM, EntName,
16311599 sizeof(EntName) - 1);
16321600 if (strncmp(EntName, "COM", 3) == 0 && EntName[3] != '\0') {
1633-#if 0
1634- GetHNRec->ComPort = (BYTE) (EntName[3]) - 0x30;
1635- if (strlen(EntName) > 4)
1636- GetHNRec->ComPort =
1637- GetHNRec->ComPort * 10 + (BYTE) (EntName[4]) -
1638- 0x30;
1639-#else
16401601 GetHNRec->ComPort = atoi(&EntName[3]);
1641-#endif
16421602 if (GetHNRec->ComPort > GetHNRec->MaxComPort)
16431603 GetHNRec->ComPort = 1;
16441604 } else {
@@ -5334,19 +5294,8 @@
53345294
53355295 pvar->showing_err = TRUE;
53365296 pvar->err_msg = NULL;
5337-#if 0
5338- // XXX: "SECURITY WARINIG" dialogで ESC キーを押下すると、
5339- // なぜかアプリケーションエラーとなるため、下記APIは削除。(2004.12.16 yutaka)
5340- if (!SSHv1(pvar)) {
5341- MessageBox(NULL, msg, "TTSSH",
5342- MB_TASKMODAL | MB_ICONEXCLAMATION);
5343- }
5344-#else
5345- // 問題なさそうなので SSH1 でもメッセージを
5346- // 表示するように戻した。(2008.2.16 maya)
53475297 MessageBox(NULL, msg, "TTSSH",
53485298 MB_TASKMODAL | MB_ICONEXCLAMATION);
5349-#endif
53505299 free(msg);
53515300 pvar->showing_err = FALSE;
53525301
Show on old repository browser