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

Diff for /src/usr.bin/ssh/kex.c between version 1.20 and 1.21

version 1.20, 2001/02/08 19:30:51 version 1.21, 2001/02/11 12:59:24
Line 41 
Line 41 
 #include "kex.h"  #include "kex.h"
 #include "key.h"  #include "key.h"
 #include "log.h"  #include "log.h"
   #include "mac.h"
   
 #define KEX_COOKIE_LEN  16  #define KEX_COOKIE_LEN  16
   
Line 412 
Line 413 
         char *name = get_match(client, server);          char *name = get_match(client, server);
         if (name == NULL)          if (name == NULL)
                 fatal("no matching mac found: client %s server %s", client, server);                  fatal("no matching mac found: client %s server %s", client, server);
         if (strcmp(name, "hmac-md5") == 0) {          if (mac_init(mac, name) < 0)
                 mac->md = EVP_md5();  
         } else if (strcmp(name, "hmac-sha1") == 0) {  
                 mac->md = EVP_sha1();  
         } else if (strcmp(name, "hmac-ripemd160@openssh.com") == 0) {  
                 mac->md = EVP_ripemd160();  
         } else {  
                 fatal("unsupported mac %s", name);                  fatal("unsupported mac %s", name);
         }          /* truncate the key */
           if (datafellows & SSH_BUG_HMAC)
                   mac->key_len = 16;
         mac->name = name;          mac->name = name;
         mac->mac_len = mac->md->md_size;  
         mac->key_len = (datafellows & SSH_BUG_HMAC) ? 16 : mac->mac_len;  
         mac->key = NULL;          mac->key = NULL;
         mac->enabled = 0;          mac->enabled = 0;
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21