[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.2 and 1.2.2.1

version 1.2, 2000/10/11 20:11:35 version 1.2.2.1, 2001/02/16 20:13:01
Line 31 
Line 31 
 #include <openssl/dh.h>  #include <openssl/dh.h>
 #include <openssl/evp.h>  #include <openssl/evp.h>
   
 #include "ssh.h"  
 #include "buffer.h"  #include "buffer.h"
   #include "cipher.h"
 #include "kex.h"  #include "kex.h"
 #include "dh.h"  #include "dh.h"
   #include "pathnames.h"
   #include "log.h"
   #include "misc.h"
   
 int  int
 parse_prime(int linenum, char *line, struct dhgroup *dhg)  parse_prime(int linenum, char *line, struct dhgroup *dhg)
Line 87 
Line 90 
   
         return (1);          return (1);
  fail:   fail:
         fprintf(stderr, "Bad prime description in line %d\n", linenum);          error("Bad prime description in line %d\n", linenum);
         return (0);          return (0);
 }  }
   
Line 100 
Line 103 
         int linenum;          int linenum;
         struct dhgroup dhg;          struct dhgroup dhg;
   
         f = fopen(DH_PRIMES, "r");          f = fopen(_PATH_DH_PRIMES, "r");
         if (!f) {          if (!f) {
                 perror(DH_PRIMES);                  log("WARNING: %s does not exist, using old prime", _PATH_DH_PRIMES);
                 log("WARNING: %s does not exist, using old prime", DH_PRIMES);  
                 return (dh_new_group1());                  return (dh_new_group1());
         }          }
   
Line 127 
Line 129 
         fclose (f);          fclose (f);
   
         if (bestcount == 0) {          if (bestcount == 0) {
                 log("WARNING: no primes in %s, using old prime", DH_PRIMES);                  log("WARNING: no primes in %s, using old prime", _PATH_DH_PRIMES);
                 return (dh_new_group1());                  return (dh_new_group1());
         }          }
   
         f = fopen(DH_PRIMES, "r");          f = fopen(_PATH_DH_PRIMES, "r");
         if (!f) {          if (!f) {
                 perror(DH_PRIMES);                  fatal("WARNING: %s dissappeared, giving up", _PATH_DH_PRIMES);
                 exit(1);  
         }          }
   
         linenum = 0;          linenum = 0;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.2.2.1