[BACK]Return to compat.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/compat.c between version 1.39 and 1.40

version 1.39, 2001/03/18 23:30:55 version 1.40, 2001/03/23 11:04:06
Line 61 
Line 61 
         } check[] = {          } check[] = {
                 { "^OpenSSH[-_]2\\.[012]",                  { "^OpenSSH[-_]2\\.[012]",
                                         SSH_OLD_SESSIONID|SSH_BUG_BANNER },                                          SSH_OLD_SESSIONID|SSH_BUG_BANNER },
                 { "^OpenSSH_2\\.3\\.0", SSH_BUG_BANNER },                  { "^OpenSSH_2\\.3\\.0", SSH_BUG_BANNER|SSH_BUG_BIGENDIANAES },
                   { "^OpenSSH_2\\.5\\.[01]p1",
                                           SSH_BUG_BIGENDIANAES },
                 { "^OpenSSH",           0 },                  { "^OpenSSH",           0 },
                 { "MindTerm",           0 },                  { "MindTerm",           0 },
                 { "^2\\.1\\.0",         SSH_BUG_SIGBLOB|SSH_BUG_HMAC|                  { "^2\\.1\\.0",         SSH_BUG_SIGBLOB|SSH_BUG_HMAC|
Line 140 
Line 142 
         }          }
         xfree(s);          xfree(s);
         return ret;          return ret;
   }
   
   char *
   compat_cipher_proposal(char *cipher_prop)
   {
           char *orig_prop, *fix_ciphers;
           char *cp, *tmp;
           size_t len;
   
           if (!(datafellows & SSH_BUG_BIGENDIANAES))
                   return(cipher_prop);
   
           len = strlen(cipher_prop) + 1;
           fix_ciphers = xmalloc(len);
           *fix_ciphers = '\0';
           tmp = orig_prop = xstrdup(cipher_prop);
           while((cp = strsep(&tmp, ",")) != NULL) {
                   if (strncmp(cp, "aes", 3) && strncmp(cp, "rijndael", 8)) {
                           if (*fix_ciphers)
                                   strlcat(fix_ciphers, ",", len);
                           strlcat(fix_ciphers, cp, len);
                   }
           }
           xfree(orig_prop);
           debug2("Original cipher proposal: %s", cipher_prop);
           debug2("Compat cipher proposal: %s", fix_ciphers);
           if (!*fix_ciphers)
                   fatal("No available ciphers found.");
   
           return(fix_ciphers);
 }  }

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40