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 3168 by doda, Fri Nov 21 18:54:22 2008 UTC revision 3169 by doda, Sat Nov 22 06:46:43 2008 UTC
# Line 3799  int get_cipher_key_len(SSHCipher cipher) Line 3799  int get_cipher_key_len(SSHCipher cipher)
3799          return (val);          return (val);
3800  }  }
3801    
3802    int get_cipher_discard_len(SSHCipher cipher)
3803    {
3804            ssh2_cipher_t *ptr = ssh2_ciphers;
3805            int val = 0;
3806    
3807            while (ptr->name != NULL) {
3808                    if (cipher == ptr->cipher) {
3809                            val = ptr->discard_len;
3810                            break;
3811                    }
3812                    ptr++;
3813            }
3814            return (val);
3815    }
3816    
3817  static char * get_cipher_string(SSHCipher cipher)  static char * get_cipher_string(SSHCipher cipher)
3818  {  {
3819          ssh2_cipher_t *ptr = ssh2_ciphers;          ssh2_cipher_t *ptr = ssh2_ciphers;
# Line 3923  void SSH2_update_cipher_myproposal(PTIns Line 3938  void SSH2_update_cipher_myproposal(PTIns
3938                  else if (cipher == SSH2_CIPHER_ARCFOUR) {                  else if (cipher == SSH2_CIPHER_ARCFOUR) {
3939                          strncat_s(buf, sizeof(buf), "arcfour,", _TRUNCATE);                          strncat_s(buf, sizeof(buf), "arcfour,", _TRUNCATE);
3940                  }                  }
3941                    else if (cipher == SSH2_CIPHER_ARCFOUR128) {
3942                            strncat_s(buf, sizeof(buf), "arcfour128,", _TRUNCATE);
3943                    }
3944                    else if (cipher == SSH2_CIPHER_ARCFOUR256) {
3945                            strncat_s(buf, sizeof(buf), "arcfour256,", _TRUNCATE);
3946                    }
3947          }          }
3948          if (buf[0] != '\0') {          if (buf[0] != '\0') {
3949                  len = strlen(buf);                  len = strlen(buf);
# Line 4039  static SSHCipher choose_SSH2_cipher_algo Line 4060  static SSHCipher choose_SSH2_cipher_algo
4060                  cipher = SSH2_CIPHER_AES192_CTR;                  cipher = SSH2_CIPHER_AES192_CTR;
4061          } else if (strstr(ptr, "aes256-ctr")) {          } else if (strstr(ptr, "aes256-ctr")) {
4062                  cipher = SSH2_CIPHER_AES256_CTR;                  cipher = SSH2_CIPHER_AES256_CTR;
4063            } else if (strstr(ptr, "arcfour128")) {
4064                    cipher = SSH2_CIPHER_ARCFOUR128;
4065            } else if (strstr(ptr, "arcfour256")) {
4066                    cipher = SSH2_CIPHER_ARCFOUR256;
4067          } else if (strstr(ptr, "arcfour")) {          } else if (strstr(ptr, "arcfour")) {
4068                  cipher = SSH2_CIPHER_ARCFOUR;                  cipher = SSH2_CIPHER_ARCFOUR;
4069          }          }
# Line 6379  static BOOL handle_SSH2_newkeys(PTInstVa Line 6404  static BOOL handle_SSH2_newkeys(PTInstVa
6404                                 | 1 << SSH2_CIPHER_AES192_CTR                                 | 1 << SSH2_CIPHER_AES192_CTR
6405                                 | 1 << SSH2_CIPHER_AES256_CTR                                 | 1 << SSH2_CIPHER_AES256_CTR
6406                                 | 1 << SSH2_CIPHER_ARCFOUR                                 | 1 << SSH2_CIPHER_ARCFOUR
6407                                   | 1 << SSH2_CIPHER_ARCFOUR128
6408                                   | 1 << SSH2_CIPHER_ARCFOUR256
6409          );          );
6410          int type = (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA) |          int type = (1 << SSH_AUTH_PASSWORD) | (1 << SSH_AUTH_RSA) |
6411                     (1 << SSH_AUTH_TIS) | (1 << SSH_AUTH_PAGEANT);                     (1 << SSH_AUTH_TIS) | (1 << SSH_AUTH_PAGEANT);

Legend:
Removed from v.3168  
changed lines
  Added in v.3169

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