Develop and Download Open Source Software

Browse Subversion Repository

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

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

revision 3042 by maya, Wed Oct 17 08:59:29 2007 UTC revision 3045 by maya, Thu Oct 18 03:49:39 2007 UTC
# Line 3373  void SSH2_update_cipher_myproposal(PTIns Line 3373  void SSH2_update_cipher_myproposal(PTIns
3373                  cipher = pvar->settings.CipherOrder[i] - '0';                  cipher = pvar->settings.CipherOrder[i] - '0';
3374                  if (cipher == 0) // disabled line                  if (cipher == 0) // disabled line
3375                          break;                          break;
3376                  if (cipher == SSH_CIPHER_AES128) {                  if (cipher == SSH2_CIPHER_AES128) {
3377                          strncat_s(buf, sizeof(buf), "aes128-cbc,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "aes128-cbc,", _TRUNCATE);
3378                  }                  }
3379                  else if (cipher == SSH_CIPHER_3DES_CBC) {                  else if (cipher == SSH2_CIPHER_3DES_CBC) {
3380                          strncat_s(buf, sizeof(buf), "3des-cbc,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "3des-cbc,", _TRUNCATE);
3381                  }                  }
3382                  else if (cipher == SSH_CIPHER_AES192) {                  else if (cipher == SSH2_CIPHER_AES192) {
3383                          strncat_s(buf, sizeof(buf), "aes192-cbc,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "aes192-cbc,", _TRUNCATE);
3384                  }                  }
3385                  else if (cipher == SSH_CIPHER_AES256) {                  else if (cipher == SSH2_CIPHER_AES256) {
3386                          strncat_s(buf, sizeof(buf), "aes256-cbc,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "aes256-cbc,", _TRUNCATE);
3387                  }                  }
3388  #ifdef SSH2_BLOWFISH                  else if (cipher == SSH2_CIPHER_BLOWFISH) {
                 else if (cipher == SSH_CIPHER_BLOWFISH) {  
3389                          strncat_s(buf, sizeof(buf), "blowfish-cbc,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "blowfish-cbc,", _TRUNCATE);
3390                  }                  }
 #endif  
3391          }          }
3392          if (buf[0] != '\0') {          if (buf[0] != '\0') {
3393                  len = strlen(buf);                  len = strlen(buf);
# Line 3491  static SSHCipher choose_SSH2_cipher_algo Line 3489  static SSHCipher choose_SSH2_cipher_algo
3489          }          }
3490    
3491          if (strstr(ptr, "3des-cbc")) {          if (strstr(ptr, "3des-cbc")) {
3492                  cipher = SSH_CIPHER_3DES_CBC;                  cipher = SSH2_CIPHER_3DES_CBC;
3493          } else if (strstr(ptr, "aes128-cbc")) {          } else if (strstr(ptr, "aes128-cbc")) {
3494                  cipher = SSH_CIPHER_AES128;                  cipher = SSH2_CIPHER_AES128;
3495          } else if (strstr(ptr, "aes192-cbc")) {          } else if (strstr(ptr, "aes192-cbc")) {
3496                  cipher = SSH_CIPHER_AES192;                  cipher = SSH2_CIPHER_AES192;
3497          } else if (strstr(ptr, "aes256-cbc")) {          } else if (strstr(ptr, "aes256-cbc")) {
3498                  cipher = SSH_CIPHER_AES256;                  cipher = SSH2_CIPHER_AES256;
 #ifdef SSH2_BLOWFISH  
3499          } else if (strstr(ptr, "blowfish-cbc")) {          } else if (strstr(ptr, "blowfish-cbc")) {
3500                  cipher = SSH_CIPHER_BLOWFISH;                  cipher = SSH2_CIPHER_BLOWFISH;
 #endif  
3501          }          }
3502    
3503          return (cipher);          return (cipher);
# Line 5682  static void do_SSH2_dispatch_setup_for_t Line 5678  static void do_SSH2_dispatch_setup_for_t
5678    
5679  static BOOL handle_SSH2_newkeys(PTInstVar pvar)  static BOOL handle_SSH2_newkeys(PTInstVar pvar)
5680  {  {
5681          int supported_ciphers = (1 << SSH_CIPHER_3DES_CBC | 1 << SSH_CIPHER_AES128          int supported_ciphers = (1 << SSH2_CIPHER_3DES_CBC | 1 << SSH2_CIPHER_AES128
5682                                 | 1 << SSH_CIPHER_AES192   | 1 << SSH_CIPHER_AES256                                 | 1 << SSH2_CIPHER_AES192   | 1 << SSH2_CIPHER_AES256
5683  #ifdef SSH2_BLOWFISH                                 | 1 << SSH2_CIPHER_BLOWFISH
                                | 1 << SSH_CIPHER_BLOWFISH  
 #endif  
5684                  );                  );
5685          int type = (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA) | (1 << SSH_AUTH_TIS);          int type = (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA) | (1 << SSH_AUTH_TIS);
5686    

Legend:
Removed from v.3042  
changed lines
  Added in v.3045

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