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 7006 by doda, Mon Dec 18 11:06:09 2017 UTC revision 7008 by doda, Mon Dec 18 11:06:16 2017 UTC
# Line 4980  static BOOL handle_SSH2_kexinit(PTInstVa Line 4980  static BOOL handle_SSH2_kexinit(PTInstVa
4980    
4981          logprintf(LOG_LEVEL_VERBOSE, "server proposal: MAC algorithm client to server: %s", buf);          logprintf(LOG_LEVEL_VERBOSE, "server proposal: MAC algorithm client to server: %s", buf);
4982    
4983          pvar->macs[MODE_OUT] = choose_SSH2_mac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_CTOS]);          if (pvar->ciphers[MODE_OUT]->auth_len > 0) {
4984          if (pvar->macs[MODE_OUT] == NULL) { // not match                  logputs(LOG_LEVEL_VERBOSE, "AEAD cipher is selected, ignoring MAC algorithms. (c2s)");
4985                  strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);                  pvar->macs[MODE_OUT] = get_ssh2_mac(HMAC_IMPLICIT);
4986                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);          }
4987                  msg = tmp;          else {
4988                  goto error;                  pvar->macs[MODE_OUT] = choose_SSH2_mac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_CTOS]);
4989                    if (pvar->macs[MODE_OUT] == NULL) { // not match
4990                            strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);
4991                            strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);
4992                            msg = tmp;
4993                            goto error;
4994                    }
4995          }          }
   
4996    
4997          size = get_payload_uint32(pvar, offset);          size = get_payload_uint32(pvar, offset);
4998          offset += 4;          offset += 4;
# Line 4999  static BOOL handle_SSH2_kexinit(PTInstVa Line 5004  static BOOL handle_SSH2_kexinit(PTInstVa
5004    
5005          logprintf(LOG_LEVEL_VERBOSE, "server proposal: MAC algorithm server to client: %s", buf);          logprintf(LOG_LEVEL_VERBOSE, "server proposal: MAC algorithm server to client: %s", buf);
5006    
5007          pvar->macs[MODE_IN] = choose_SSH2_mac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_STOC]);          if (pvar->ciphers[MODE_IN]->auth_len > 0) {
5008          if (pvar->macs[MODE_IN] == NULL) { // not match                  logputs(LOG_LEVEL_VERBOSE, "AEAD cipher is selected, ignoring MAC algorithms. (s2c)");
5009                  strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);                  pvar->macs[MODE_IN] = get_ssh2_mac(HMAC_IMPLICIT);
5010                  strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);          }
5011                  msg = tmp;          else {
5012                  goto error;                  pvar->macs[MODE_IN] = choose_SSH2_mac_algorithm(buf, myproposal[PROPOSAL_MAC_ALGS_STOC]);
5013                    if (pvar->macs[MODE_IN] == NULL) { // not match
5014                            strncpy_s(tmp, sizeof(tmp), "unknown MAC algorithm: ", _TRUNCATE);
5015                            strncat_s(tmp, sizeof(tmp), buf, _TRUNCATE);
5016                            msg = tmp;
5017                            goto error;
5018                    }
5019          }          }
   
5020    
5021          // 圧縮アルゴリズムの決定          // 圧縮アルゴリズムの決定
5022          // pvar->ssh_state.compressing = FALSE; として下記メンバを使用する。          // pvar->ssh_state.compressing = FALSE; として下記メンバを使用する。

Legend:
Removed from v.7006  
changed lines
  Added in v.7008

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