[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.59 and 1.60

version 1.59, 2004/06/13 12:53:24 version 1.60, 2004/06/21 17:36:31
Line 148 
Line 148 
 void  void
 kex_send_kexinit(Kex *kex)  kex_send_kexinit(Kex *kex)
 {  {
         u_int32_t rand = 0;          u_int32_t rnd = 0;
         u_char *cookie;          u_char *cookie;
         int i;          int i;
   
Line 168 
Line 168 
         cookie = buffer_ptr(&kex->my);          cookie = buffer_ptr(&kex->my);
         for (i = 0; i < KEX_COOKIE_LEN; i++) {          for (i = 0; i < KEX_COOKIE_LEN; i++) {
                 if (i % 4 == 0)                  if (i % 4 == 0)
                         rand = arc4random();                          rnd = arc4random();
                 cookie[i] = rand;                  cookie[i] = rnd;
                 rand >>= 8;                  rnd >>= 8;
         }          }
         packet_start(SSH2_MSG_KEXINIT);          packet_start(SSH2_MSG_KEXINIT);
         packet_put_raw(buffer_ptr(&kex->my), buffer_len(&kex->my));          packet_put_raw(buffer_ptr(&kex->my), buffer_len(&kex->my));

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60