View | Details | Raw Unified | Return to bug 2559 | Differences between
and this patch

Collapse All | Expand All

(-)dh.c (-6 / +6 lines)
Lines 28-33 Link Here
28
#include <openssl/bn.h>
28
#include <openssl/bn.h>
29
#include <openssl/dh.h>
29
#include <openssl/dh.h>
30
30
31
#include <errno.h>
31
#include <stdio.h>
32
#include <stdio.h>
32
#include <stdlib.h>
33
#include <stdlib.h>
33
#include <string.h>
34
#include <string.h>
Lines 148-157 choose_dh(int min, int wantbits, int max Link Here
148
	int linenum;
149
	int linenum;
149
	struct dhgroup dhg;
150
	struct dhgroup dhg;
150
151
151
	if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL &&
152
	if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL) {
152
	    (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) {
153
		logit("WARNING: could open open %s (%s), using fixed modulus",
153
		logit("WARNING: %s does not exist, using fixed modulus",
154
		    _PATH_DH_MODULI, strerror(errno));
154
		    _PATH_DH_MODULI);
155
		return (dh_new_group_fallback(max));
155
		return (dh_new_group_fallback(max));
156
	}
156
	}
157
157
Lines 179-185 choose_dh(int min, int wantbits, int max Link Here
179
179
180
	if (bestcount == 0) {
180
	if (bestcount == 0) {
181
		fclose(f);
181
		fclose(f);
182
		logit("WARNING: no suitable primes in %s", _PATH_DH_PRIMES);
182
		logit("WARNING: no suitable primes in %s", _PATH_DH_MODULI);
183
		return (dh_new_group_fallback(max));
183
		return (dh_new_group_fallback(max));
184
	}
184
	}
185
185
Lines 200-206 choose_dh(int min, int wantbits, int max Link Here
200
	fclose(f);
200
	fclose(f);
201
	if (linenum != which+1) {
201
	if (linenum != which+1) {
202
		logit("WARNING: line %d disappeared in %s, giving up",
202
		logit("WARNING: line %d disappeared in %s, giving up",
203
		    which, _PATH_DH_PRIMES);
203
		    which, _PATH_DH_MODULI);
204
		return (dh_new_group_fallback(max));
204
		return (dh_new_group_fallback(max));
205
	}
205
	}
206
206
(-)pathnames.h (-2 lines)
Lines 36-43 Link Here
36
#define _PATH_HOST_RSA_KEY_FILE		SSHDIR "/ssh_host_rsa_key"
36
#define _PATH_HOST_RSA_KEY_FILE		SSHDIR "/ssh_host_rsa_key"
37
#define _PATH_HOST_ED25519_KEY_FILE	SSHDIR "/ssh_host_ed25519_key"
37
#define _PATH_HOST_ED25519_KEY_FILE	SSHDIR "/ssh_host_ed25519_key"
38
#define _PATH_DH_MODULI			ETCDIR "/moduli"
38
#define _PATH_DH_MODULI			ETCDIR "/moduli"
39
/* Backwards compatibility */
40
#define _PATH_DH_PRIMES			ETCDIR "/primes"
41
39
42
#define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
40
#define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
43
41

Return to bug 2559