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

Diff for /src/usr.bin/ssh/kexgex.c between version 1.9.2.1 and 1.9.2.2

version 1.9.2.1, 2002/03/07 17:37:46 version 1.9.2.2, 2002/05/17 00:03:23
Line 38 
Line 38 
 #include "dh.h"  #include "dh.h"
 #include "ssh2.h"  #include "ssh2.h"
 #include "compat.h"  #include "compat.h"
   #include "monitor_wrap.h"
   
 static u_char *  static u_char *
 kexgex_hash(  kexgex_hash(
Line 259 
Line 260 
 {  {
         BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;          BIGNUM *shared_secret = NULL, *dh_client_pub = NULL;
         Key *server_host_key;          Key *server_host_key;
         DH *dh = dh;          DH *dh;
         u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;          u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
         u_int sbloblen, klen, kout, slen;          u_int sbloblen, klen, kout, slen;
         int min = -1, max = -1, nbits = -1, type;          int min = -1, max = -1, nbits = -1, type;
Line 296 
Line 297 
                 fatal("DH_GEX_REQUEST, bad parameters: %d !< %d !< %d",                  fatal("DH_GEX_REQUEST, bad parameters: %d !< %d !< %d",
                     min, nbits, max);                      min, nbits, max);
   
         dh = choose_dh(min, nbits, max);          /* Contact privileged parent */
           dh = PRIVSEP(choose_dh(min, nbits, max));
         if (dh == NULL)          if (dh == NULL)
                 packet_disconnect("Protocol error: no matching DH grp found");                  packet_disconnect("Protocol error: no matching DH grp found");
   
Line 379 
Line 381 
   
         /* sign H */          /* sign H */
         /* XXX hashlen depends on KEX */          /* XXX hashlen depends on KEX */
         key_sign(server_host_key, &signature, &slen, hash, 20);          PRIVSEP(key_sign(server_host_key, &signature, &slen, hash, 20));
   
         /* destroy_sensitive_data(); */          /* destroy_sensitive_data(); */
   
Line 390 
Line 392 
         packet_put_bignum2(dh->pub_key);        /* f */          packet_put_bignum2(dh->pub_key);        /* f */
         packet_put_string(signature, slen);          packet_put_string(signature, slen);
         packet_send();          packet_send();
   
         xfree(signature);          xfree(signature);
         xfree(server_host_key_blob);          xfree(server_host_key_blob);
         /* have keys, free DH */          /* have keys, free DH */

Legend:
Removed from v.1.9.2.1  
changed lines
  Added in v.1.9.2.2