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

Diff for /src/usr.bin/ssh/Attic/sshconnect1.c between version 1.56 and 1.56.2.1

version 1.56, 2003/08/28 12:54:34 version 1.56.2.1, 2004/08/19 22:37:32
Line 24 
Line 24 
 #include "rsa.h"  #include "rsa.h"
 #include "buffer.h"  #include "buffer.h"
 #include "packet.h"  #include "packet.h"
 #include "mpaux.h"  #include "kex.h"
 #include "uidswap.h"  #include "uidswap.h"
 #include "log.h"  #include "log.h"
 #include "readconf.h"  #include "readconf.h"
Line 32 
Line 32 
 #include "authfd.h"  #include "authfd.h"
 #include "sshconnect.h"  #include "sshconnect.h"
 #include "authfile.h"  #include "authfile.h"
 #include "readpass.h"  #include "misc.h"
 #include "cipher.h"  #include "cipher.h"
 #include "canohost.h"  #include "canohost.h"
 #include "auth.h"  #include "auth.h"
Line 476 
Line 476 
         u_char cookie[8];          u_char cookie[8];
         u_int supported_ciphers;          u_int supported_ciphers;
         u_int server_flags, client_flags;          u_int server_flags, client_flags;
         u_int32_t rand = 0;          u_int32_t rnd = 0;
   
         debug("Waiting for server public key.");          debug("Waiting for server public key.");
   
Line 528 
Line 528 
   
         client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN;          client_flags = SSH_PROTOFLAG_SCREEN_NUMBER | SSH_PROTOFLAG_HOST_IN_FWD_OPEN;
   
         compute_session_id(session_id, cookie, host_key->rsa->n, server_key->rsa->n);          derive_ssh1_session_id(host_key->rsa->n, server_key->rsa->n, cookie, session_id);
   
         /* Generate a session key. */          /* Generate a session key. */
         arc4random_stir();          arc4random_stir();
Line 540 
Line 540 
          */           */
         for (i = 0; i < 32; i++) {          for (i = 0; i < 32; i++) {
                 if (i % 4 == 0)                  if (i % 4 == 0)
                         rand = arc4random();                          rnd = arc4random();
                 session_key[i] = rand & 0xff;                  session_key[i] = rnd & 0xff;
                 rand >>= 8;                  rnd >>= 8;
         }          }
   
         /*          /*
Line 598 
Line 598 
         if (options.cipher == SSH_CIPHER_NOT_SET) {          if (options.cipher == SSH_CIPHER_NOT_SET) {
                 if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default))                  if (cipher_mask_ssh1(1) & supported_ciphers & (1 << ssh_cipher_default))
                         options.cipher = ssh_cipher_default;                          options.cipher = ssh_cipher_default;
         } else if (options.cipher == SSH_CIPHER_ILLEGAL ||          } else if (options.cipher == SSH_CIPHER_INVALID ||
             !(cipher_mask_ssh1(1) & (1 << options.cipher))) {              !(cipher_mask_ssh1(1) & (1 << options.cipher))) {
                 logit("No valid SSH1 cipher, using %.100s instead.",                  logit("No valid SSH1 cipher, using %.100s instead.",
                     cipher_name(ssh_cipher_default));                      cipher_name(ssh_cipher_default));

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.56.2.1