[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.9 and 1.10

version 1.9, 2001/03/27 17:46:49 version 1.10, 2001/03/28 22:04:57
Line 79 
Line 79 
                 goto fail;                  goto fail;
   
         dhg->g = BN_new();          dhg->g = BN_new();
         if (BN_hex2bn(&dhg->g, gen) < 0) {  
                 BN_free(dhg->g);  
                 goto fail;  
         }  
         dhg->p = BN_new();          dhg->p = BN_new();
         if (BN_hex2bn(&dhg->p, prime) < 0) {          if (BN_hex2bn(&dhg->g, gen) < 0)
                 BN_free(dhg->g);                  goto failclean;
                 BN_free(dhg->p);  
                 goto fail;  
         }  
   
           if (BN_hex2bn(&dhg->p, prime) < 0)
                   goto failclean;
   
           if (BN_num_bits(dhg->p) != dhg->size)
                   goto failclean;
   
         return (1);          return (1);
   
    failclean:
           BN_free(dhg->g);
           BN_free(dhg->p);
  fail:   fail:
         error("Bad prime description in line %d", linenum);          error("Bad prime description in line %d", linenum);
         return (0);          return (0);

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10