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

Diff for /src/usr.bin/ssh/dh.c between version 1.21.2.1 and 1.21.2.2

version 1.21.2.1, 2002/10/11 14:51:52 version 1.21.2.2, 2003/04/03 22:35:17
Line 182 
Line 182 
         for (i = 0; i <= n; i++)          for (i = 0; i <= n; i++)
                 if (BN_is_bit_set(dh_pub, i))                  if (BN_is_bit_set(dh_pub, i))
                         bits_set++;                          bits_set++;
         debug("bits set: %d/%d", bits_set, BN_num_bits(dh->p));          debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p));
   
         /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */          /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */
         if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1))          if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1))
Line 214 
Line 214 
                 for (i = 0; i <= BN_num_bits(dh->priv_key); i++)                  for (i = 0; i <= BN_num_bits(dh->priv_key); i++)
                         if (BN_is_bit_set(dh->priv_key, i))                          if (BN_is_bit_set(dh->priv_key, i))
                                 bits_set++;                                  bits_set++;
                 debug("dh_gen_key: priv key bits set: %d/%d",                  debug2("dh_gen_key: priv key bits set: %d/%d",
                     bits_set, BN_num_bits(dh->priv_key));                      bits_set, BN_num_bits(dh->priv_key));
                 if (tries++ > 10)                  if (tries++ > 10)
                         fatal("dh_gen_key: too many bad keys: giving up");                          fatal("dh_gen_key: too many bad keys: giving up");

Legend:
Removed from v.1.21.2.1  
changed lines
  Added in v.1.21.2.2