[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.15 and 1.16

version 1.15, 2001/06/22 21:27:07 version 1.16, 2001/06/22 21:57:59
Line 103 
Line 103 
 choose_dh(int min, int wantbits, int max)  choose_dh(int min, int wantbits, int max)
 {  {
         FILE *f;          FILE *f;
         char line[1024];          char line[2048];
         int best, bestcount, which;          int best, bestcount, which;
         int linenum;          int linenum;
         struct dhgroup dhg;          struct dhgroup dhg;
Line 134 
Line 134 
                 if (dhg.size == best)                  if (dhg.size == best)
                         bestcount++;                          bestcount++;
         }          }
         fclose (f);          rewind(f);
   
         if (bestcount == 0) {          if (bestcount == 0) {
                   fclose(f);
                 log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);                  log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);
                 return (NULL);                  return (NULL);
         }  
   
         f = fopen(_PATH_DH_PRIMES, "r");  
         if (!f) {  
                 fatal("WARNING: %s disappeared, giving up", _PATH_DH_PRIMES);  
         }          }
   
         linenum = 0;          linenum = 0;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16