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 5193 by yutakapon, Sat Apr 6 12:03:01 2013 UTC revision 5262 by doda, Mon May 13 07:43:42 2013 UTC
# Line 1059  void finish_send_packet_special(PTInstVa Line 1059  void finish_send_packet_special(PTInstVa
1059                                               pvar->ssh_state.sender_sequence_number,                                               pvar->ssh_state.sender_sequence_number,
1060                                               data, encryption_size,                                               data, encryption_size,
1061                                               data + encryption_size);                                               data + encryption_size);
1062                  if (ret == FALSE) { // HMACがまだ設定されていない場合                  if (ret == FALSE) { // MACがまだ設定されていない場合
1063                          data_length = encryption_size;                          data_length = encryption_size;
1064                  }                  }
1065    
1066                  // パケットを暗号化する。HMAC以降は暗号化対象外。                  // パケットを暗号化する。MAC以降は暗号化対象外。
1067                  CRYPT_encrypt(pvar, data, encryption_size);                  CRYPT_encrypt(pvar, data, encryption_size);
1068          }          }
1069    
# Line 4874  static BOOL handle_SSH2_kexinit(PTInstVa Line 4874  static BOOL handle_SSH2_kexinit(PTInstVa
4874          }          }
4875    
4876    
4877          // HMAC(Hash Message Authentication Code)アルゴリズムの決定 (2004.12.17 yutaka)          // MAC(Hash Message Authentication Code)アルゴリズムの決定 (2004.12.17 yutaka)
4878          size = get_payload_uint32(pvar, offset);          size = get_payload_uint32(pvar, offset);
4879          offset += 4;          offset += 4;
4880          for (i = 0; i < size; i++) {          for (i = 0; i < size; i++) {
# Line 4888  static BOOL handle_SSH2_kexinit(PTInstVa Line 4888  static BOOL handle_SSH2_kexinit(PTInstVa
4888    
4889          pvar->ctos_hmac = choose_SSH2_hmac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_CTOS]);          pvar->ctos_hmac = choose_SSH2_hmac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_CTOS]);
4890          if (pvar->ctos_hmac == HMAC_UNKNOWN) { // not match          if (pvar->ctos_hmac == HMAC_UNKNOWN) { // not match
4891                  strncpy_s(tmp, sizeof(tmp), "unknown HMAC algorithm: ", _TRUNCATE);                  strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);
4892                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);
4893                  msg = tmp;                  msg = tmp;
4894                  goto error;                  goto error;
# Line 4908  static BOOL handle_SSH2_kexinit(PTInstVa Line 4908  static BOOL handle_SSH2_kexinit(PTInstVa
4908    
4909          pvar->stoc_hmac = choose_SSH2_hmac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_STOC]);          pvar->stoc_hmac = choose_SSH2_hmac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_STOC]);
4910          if (pvar->stoc_hmac == HMAC_UNKNOWN) { // not match          if (pvar->stoc_hmac == HMAC_UNKNOWN) { // not match
4911                  strncpy_s(tmp, sizeof(tmp), "unknown HMAC algorithm: ", _TRUNCATE);                  strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);
4912                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);
4913                  msg = tmp;                  msg = tmp;
4914                  goto error;                  goto error;

Legend:
Removed from v.5193  
changed lines
  Added in v.5262

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