summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2001-06-22 21:27:09 +0000
committerNiels Provos <provos@cvs.openbsd.org>2001-06-22 21:27:09 +0000
commitbbc59d7657e410f325b17a2d31bfc768156a5dd0 (patch)
tree18d2281084df14c784ea253c0245e89ffe5fb469 /usr.bin/ssh
parent7f0d3969b33f9df8ff58e94337621eb515a896d4 (diff)
use /etc/moduli instead of /etc/primes, okay markus@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/dh.c8
-rw-r--r--usr.bin/ssh/pathnames.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ssh/dh.c b/usr.bin/ssh/dh.c
index 575522ddb5e..26deb9fbf07 100644
--- a/usr.bin/ssh/dh.c
+++ b/usr.bin/ssh/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());
}
diff --git a/usr.bin/ssh/pathnames.h b/usr.bin/ssh/pathnames.h
index 064665a2e12..818fbf6c8ad 100644
--- a/usr.bin/ssh/pathnames.h
+++ b/usr.bin/ssh/pathnames.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pathnames.h,v 1.6 2001/06/08 15:25:40 markus Exp $ */
+/* $OpenBSD: pathnames.h,v 1.7 2001/06/22 21:27:08 provos Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -31,6 +31,8 @@
#define _PATH_HOST_KEY_FILE ETCDIR "/ssh_host_key"
#define _PATH_HOST_DSA_KEY_FILE ETCDIR "/ssh_host_dsa_key"
#define _PATH_HOST_RSA_KEY_FILE ETCDIR "/ssh_host_rsa_key"
+#define _PATH_DH_MODULI ETCDIR "/moduli"
+/* Backwards compatibility */
#define _PATH_DH_PRIMES ETCDIR "/primes"
#define _PATH_SSH_PROGRAM "/usr/bin/ssh"