Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6714 by doda, Fri May 12 12:41:49 2017 UTC revision 6715 by doda, Fri May 12 12:41:55 2017 UTC
# Line 229  static void normalize_generic_order(char Line 229  static void normalize_generic_order(char
229                  }                  }
230          }          }
231    
 #if 1  
232          // 指定されていない文字があれば、disabled lineの直前に挿入する。          // 指定されていない文字があれば、disabled lineの直前に挿入する。
233          //          //
234          // ex. (Zを挿入する)          // ex. (Zを挿入する)
# Line 271  static void normalize_generic_order(char Line 270  static void normalize_generic_order(char
270                          i++;                          i++;
271                  }                  }
272          }          }
 #else  
         for (j = 0; j < default_strings_len ; j++) {  
                 int num = default_strings[j];  
   
                 if (!listed[num]) {  
                         buf[i] = num + '0';  
                         i++;  
                 }  
         }  
 #endif  
273    
274          buf[i] = 0;          buf[i] = 0;
275  }  }
# Line 293  static void normalize_cipher_order(char Line 282  static void normalize_cipher_order(char
282  {  {
283          /* SSH_CIPHER_NONE means that all ciphers below that one are disabled.          /* SSH_CIPHER_NONE means that all ciphers below that one are disabled.
284             We *never* allow no encryption. */             We *never* allow no encryption. */
 #if 0  
         static char default_strings[] = {  
                 SSH_CIPHER_3DES,  
                 SSH_CIPHER_NONE,  
                 SSH_CIPHER_DES, SSH_CIPHER_BLOWFISH  
         };  
 #else  
         // for SSH2(yutaka)  
285          static char default_strings[] = {          static char default_strings[] = {
286                  SSH2_CIPHER_CAMELLIA256_CTR,                  SSH2_CIPHER_CAMELLIA256_CTR,
287                  SSH2_CIPHER_AES256_CTR,                  SSH2_CIPHER_AES256_CTR,
# Line 329  static void normalize_cipher_order(char Line 310  static void normalize_cipher_order(char
310                  SSH_CIPHER_DES,                  SSH_CIPHER_DES,
311                  0, 0, 0 // Dummy for SSH_CIPHER_IDEA, SSH_CIPHER_TSS, SSH_CIPHER_RC4                  0, 0, 0 // Dummy for SSH_CIPHER_IDEA, SSH_CIPHER_TSS, SSH_CIPHER_RC4
312          };          };
 #endif  
313    
314          normalize_generic_order(buf, default_strings, NUM_ELEM(default_strings));          normalize_generic_order(buf, default_strings, NUM_ELEM(default_strings));
315  }  }
# Line 800  static int PASCAL FAR TTXconnect(SOCKET Line 780  static int PASCAL FAR TTXconnect(SOCKET
780                  case AF_INET6:                  case AF_INET6:
781                          len = sizeof(struct sockaddr_in6);                          len = sizeof(struct sockaddr_in6);
782                          ((struct sockaddr_in6 FAR *) &ss)->sin6_family = AF_INET6;                          ((struct sockaddr_in6 FAR *) &ss)->sin6_family = AF_INET6;
 #if 0                                                   /* symbol "in6addr_any" is not included in wsock32.lib */  
                         /* if wsock32.lib will be linked, we can't refer "in6addr_any" */  
                         ((struct sockaddr_in6 FAR *) &ss)->sin6_addr = in6addr_any;  
 #else  
783                          memset(&((struct sockaddr_in6 FAR *) &ss)->sin6_addr, 0,                          memset(&((struct sockaddr_in6 FAR *) &ss)->sin6_addr, 0,
784                                 sizeof(struct in_addr6));                                 sizeof(struct in_addr6));
 #endif                                                  /* 0 */  
785                          ((struct sockaddr_in6 FAR *) &ss)->sin6_port =                          ((struct sockaddr_in6 FAR *) &ss)->sin6_port =
786                                  htons(find_local_port(pvar));                                  htons(find_local_port(pvar));
787                          break;                          break;
# Line 899  void notify_established_secure_connectio Line 874  void notify_established_secure_connectio
874          }          }
875    
876          if (SecureLargeIcon != NULL && SecureSmallIcon != NULL) {          if (SecureLargeIcon != NULL && SecureSmallIcon != NULL) {
 #if 0  
                 // 大きいアイコンは WNDCLASS にセットしているので取り出し方が違う (2006.8.10 maya)  
                 pvar->OldLargeIcon =  
                         (HICON) GetClassLong(pvar->NotificationWindow, GCL_HICON);  
 #else  
                 // Tera Term 側が WM_SETICON するようになったので普通に取り出す (2009.6.9 maya)  
877                  pvar->OldLargeIcon =                  pvar->OldLargeIcon =
878                          (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,                          (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
879                                              ICON_BIG, 0);                                              ICON_BIG, 0);
 #endif  
880                  pvar->OldSmallIcon =                  pvar->OldSmallIcon =
881                          (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,                          (HICON) SendMessage(pvar->NotificationWindow, WM_GETICON,
882                                              ICON_SMALL, 0);                                              ICON_SMALL, 0);
# Line 1630  static BOOL CALLBACK TTXHostDlg(HWND dlg Line 1598  static BOOL CALLBACK TTXHostDlg(HWND dlg
1598                                          GetDlgItemText(dlg, IDC_HOSTCOM, EntName,                                          GetDlgItemText(dlg, IDC_HOSTCOM, EntName,
1599                                                         sizeof(EntName) - 1);                                                         sizeof(EntName) - 1);
1600                                          if (strncmp(EntName, "COM", 3) == 0 && EntName[3] != '\0') {                                          if (strncmp(EntName, "COM", 3) == 0 && EntName[3] != '\0') {
 #if 0  
                                                 GetHNRec->ComPort = (BYTE) (EntName[3]) - 0x30;  
                                                 if (strlen(EntName) > 4)  
                                                         GetHNRec->ComPort =  
                                                                 GetHNRec->ComPort * 10 + (BYTE) (EntName[4]) -  
                                                                 0x30;  
 #else  
1601                                                  GetHNRec->ComPort = atoi(&EntName[3]);                                                  GetHNRec->ComPort = atoi(&EntName[3]);
 #endif  
1602                                                  if (GetHNRec->ComPort > GetHNRec->MaxComPort)                                                  if (GetHNRec->ComPort > GetHNRec->MaxComPort)
1603                                                          GetHNRec->ComPort = 1;                                                          GetHNRec->ComPort = 1;
1604                                          } else {                                          } else {
# Line 5334  static int PASCAL FAR TTXProcessCommand( Line 5294  static int PASCAL FAR TTXProcessCommand(
5294    
5295                          pvar->showing_err = TRUE;                          pvar->showing_err = TRUE;
5296                          pvar->err_msg = NULL;                          pvar->err_msg = NULL;
 #if 0  
                         // XXX: "SECURITY WARINIG" dialogで ESC キーを押下すると、  
                         // なぜかアプリケーションエラーとなるため、下記APIは削除。(2004.12.16 yutaka)  
                         if (!SSHv1(pvar)) {  
                                 MessageBox(NULL, msg, "TTSSH",  
                                                 MB_TASKMODAL | MB_ICONEXCLAMATION);  
                         }  
 #else  
                         // 問題なさそうなので SSH1 でもメッセージを  
                         // 表示するように戻した。(2008.2.16 maya)  
5297                          MessageBox(NULL, msg, "TTSSH",                          MessageBox(NULL, msg, "TTSSH",
5298                                             MB_TASKMODAL | MB_ICONEXCLAMATION);                                             MB_TASKMODAL | MB_ICONEXCLAMATION);
 #endif  
5299                          free(msg);                          free(msg);
5300                          pvar->showing_err = FALSE;                          pvar->showing_err = FALSE;
5301    

Legend:
Removed from v.6714  
changed lines
  Added in v.6715

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26