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 2863 by yutakakn, Fri Apr 7 13:24:16 2006 UTC revision 2870 by yutakakn, Tue Jun 13 15:21:00 2006 UTC
# Line 3400  static enum hmac_type choose_SSH2_hmac_a Line 3400  static enum hmac_type choose_SSH2_hmac_a
3400    
3401  static int choose_SSH2_compression_algorithm(char *server_proposal, char *my_proposal)  static int choose_SSH2_compression_algorithm(char *server_proposal, char *my_proposal)
3402  {  {
3403          char tmp[1024], *ptr;          char tmp[1024], *ptr, *q, *index;
3404          int ret = -1;          int ret = -1;
3405    
3406            // OpenSSH 4.3では遅延パケット圧縮("zlib@openssh.com")が新規追加されているため、
3407            // マッチしないように修正した。
3408            // 現TeraTermでは遅延パケット圧縮は将来的にサポートする予定。
3409            // (2006.6.14 yutaka)
3410    
3411          _snprintf(tmp, sizeof(tmp), my_proposal);          _snprintf(tmp, sizeof(tmp), my_proposal);
3412          ptr = strtok(tmp, ","); // not thread-safe          ptr = strtok(tmp, ","); // not thread-safe
3413          while (ptr != NULL) {          while (ptr != NULL) {
3414                  // server_proposalにはサーバのproposalがカンマ文字列で格納されている                  // server_proposalにはサーバのproposalがカンマ文字列で格納されている
3415                  if (strstr(server_proposal, ptr)) { // match                  for (index = server_proposal; index < server_proposal + strlen(server_proposal) ; index++) {
3416                          break;                          if (q = strstr(index, ptr)) { // match
3417                                    q = q + strlen(ptr);
3418                                    if (*q == '\0' || *q == ',')  // 単語の区切りであればマッチ
3419                                            goto found;
3420                                    index = q;  // pointer update
3421                            }
3422                  }                  }
3423                  ptr = strtok(NULL, ",");                  ptr = strtok(NULL, ",");
3424          }          }
3425    
3426    found:
3427          if (strstr(ptr, "zlib")) {          if (strstr(ptr, "zlib")) {
3428                  ret = 1; // packet compression enabled                  ret = 1; // packet compression enabled
3429          } else if (strstr(ptr, "none")) {          } else if (strstr(ptr, "none")) {
# Line 6816  static BOOL handle_SSH2_window_adjust(PT Line 6828  static BOOL handle_SSH2_window_adjust(PT
6828    
6829  /*  /*
6830   * $Log: not supported by cvs2svn $   * $Log: not supported by cvs2svn $
6831     * Revision 1.44  2006/04/07 13:24:16  yutakakn
6832     * HP-UXにおいてX11 fowardingが失敗した場合に、SSH2セッションが切断されないようにした。
6833     *
6834   * Revision 1.43  2006/03/29 14:56:52  yutakakn   * Revision 1.43  2006/03/29 14:56:52  yutakakn
6835   * known_hostsファイルにキー種別の異なる同一ホストのエントリがあると、アプリケーションエラーとなるバグを修正した。   * known_hostsファイルにキー種別の異なる同一ホストのエントリがあると、アプリケーションエラーとなるバグを修正した。
6836   *   *

Legend:
Removed from v.2863  
changed lines
  Added in v.2870

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