[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.13 and 1.14

version 1.13, 2001/04/04 23:09:17 version 1.14, 2001/04/15 08:43:45
Line 80 
Line 80 
   
         dhg->g = BN_new();          dhg->g = BN_new();
         dhg->p = BN_new();          dhg->p = BN_new();
         if (BN_hex2bn(&dhg->g, gen) < 0)          if (BN_hex2bn(&dhg->g, gen) == 0)
                 goto failclean;                  goto failclean;
   
         if (BN_hex2bn(&dhg->p, prime) < 0)          if (BN_hex2bn(&dhg->p, prime) == 0)
                 goto failclean;                  goto failclean;
   
         if (BN_num_bits(dhg->p) != dhg->size)          if (BN_num_bits(dhg->p) != dhg->size)
Line 228 
Line 228 
 dh_new_group_asc(const char *gen, const char *modulus)  dh_new_group_asc(const char *gen, const char *modulus)
 {  {
         DH *dh;          DH *dh;
         int ret;  
   
         dh = DH_new();          dh = DH_new();
         if (dh == NULL)          if (dh == NULL)
                 fatal("DH_new");                  fatal("DH_new");
   
         if ((ret = BN_hex2bn(&dh->p, modulus)) < 0)          if (BN_hex2bn(&dh->p, modulus) == 0)
                 fatal("BN_hex2bn p");                  fatal("BN_hex2bn p");
         if ((ret = BN_hex2bn(&dh->g, gen)) < 0)          if (BN_hex2bn(&dh->g, gen) == 0)
                 fatal("BN_hex2bn g");                  fatal("BN_hex2bn g");
   
         return (dh);          return (dh);

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14