summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-25 04:13:25 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-25 04:13:25 +0000
commit93a29e046e297c060a48fcdd1e43641470d78cdd (patch)
treed9370dfcda997e302365dabf979a35af49c62e3c /dh.c
parentd2bf0d64d93b942120e937058b189668069e77fd (diff)
- provos@cvs.openbsd.org 2001/06/22 21:27:08
[dh.c pathnames.h] use /etc/moduli instead of /etc/primes, okay markus@
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/dh.c b/dh.c
index 575522dd..26deb9fb 100644
--- a/dh.c
+++ b/dh.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: dh.c,v 1.14 2001/04/15 08:43:45 markus Exp $");
+RCSID("$OpenBSD: dh.c,v 1.15 2001/06/22 21:27:07 provos Exp $");
#include "xmalloc.h"
@@ -108,9 +108,9 @@ choose_dh(int min, int wantbits, int max)
int linenum;
struct dhgroup dhg;
- f = fopen(_PATH_DH_PRIMES, "r");
- if (!f) {
- log("WARNING: %s does not exist, using old prime", _PATH_DH_PRIMES);
+ if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL &&
+ (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) {
+ log("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI);
return (dh_new_group1());
}