summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/dh.c b/dh.c
index 87a478450..f1f7e5d43 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: dh.c,v 1.4 2001/01/15 21:43:51 markus Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.6 2001/01/21 19:05:49 markus Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -31,10 +31,13 @@ RCSID("$OpenBSD: dh.c,v 1.4 2001/01/15 21:43:51 markus Exp $");
31#include <openssl/dh.h> 31#include <openssl/dh.h>
32#include <openssl/evp.h> 32#include <openssl/evp.h>
33 33
34#include "ssh.h"
35#include "buffer.h" 34#include "buffer.h"
35#include "cipher.h"
36#include "kex.h" 36#include "kex.h"
37#include "dh.h" 37#include "dh.h"
38#include "pathnames.h"
39#include "log.h"
40#include "misc.h"
38 41
39int 42int
40parse_prime(int linenum, char *line, struct dhgroup *dhg) 43parse_prime(int linenum, char *line, struct dhgroup *dhg)
@@ -100,9 +103,9 @@ choose_dh(int minbits)
100 int linenum; 103 int linenum;
101 struct dhgroup dhg; 104 struct dhgroup dhg;
102 105
103 f = fopen(DH_PRIMES, "r"); 106 f = fopen(_PATH_DH_PRIMES, "r");
104 if (!f) { 107 if (!f) {
105 log("WARNING: %s does not exist, using old prime", DH_PRIMES); 108 log("WARNING: %s does not exist, using old prime", _PATH_DH_PRIMES);
106 return (dh_new_group1()); 109 return (dh_new_group1());
107 } 110 }
108 111
@@ -126,13 +129,13 @@ choose_dh(int minbits)
126 fclose (f); 129 fclose (f);
127 130
128 if (bestcount == 0) { 131 if (bestcount == 0) {
129 log("WARNING: no primes in %s, using old prime", DH_PRIMES); 132 log("WARNING: no primes in %s, using old prime", _PATH_DH_PRIMES);
130 return (dh_new_group1()); 133 return (dh_new_group1());
131 } 134 }
132 135
133 f = fopen(DH_PRIMES, "r"); 136 f = fopen(_PATH_DH_PRIMES, "r");
134 if (!f) { 137 if (!f) {
135 fatal("WARNING: %s dissappeared, giving up", DH_PRIMES); 138 fatal("WARNING: %s dissappeared, giving up", _PATH_DH_PRIMES);
136 } 139 }
137 140
138 linenum = 0; 141 linenum = 0;