diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
commit | 854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch) | |
tree | 96755f8590acc2146f4b4ef5b5cdba600e5d9353 /dh.c | |
parent | fad82e8999e790899083f9e22a1841148d746df6 (diff) | |
parent | 053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff) |
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'dh.c')
-rw-r--r-- | dh.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -112,7 +112,7 @@ choose_dh(int min, int wantbits, int max) | |||
112 | 112 | ||
113 | if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL && | 113 | if ((f = fopen(_PATH_DH_MODULI, "r")) == NULL && |
114 | (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) { | 114 | (f = fopen(_PATH_DH_PRIMES, "r")) == NULL) { |
115 | logit("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI); | 115 | log("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI); |
116 | return (dh_new_group1()); | 116 | return (dh_new_group1()); |
117 | } | 117 | } |
118 | 118 | ||
@@ -140,7 +140,7 @@ choose_dh(int min, int wantbits, int max) | |||
140 | 140 | ||
141 | if (bestcount == 0) { | 141 | if (bestcount == 0) { |
142 | fclose(f); | 142 | fclose(f); |
143 | logit("WARNING: no suitable primes in %s", _PATH_DH_PRIMES); | 143 | log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES); |
144 | return (NULL); | 144 | return (NULL); |
145 | } | 145 | } |
146 | 146 | ||
@@ -176,7 +176,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) | |||
176 | int bits_set = 0; | 176 | int bits_set = 0; |
177 | 177 | ||
178 | if (dh_pub->neg) { | 178 | if (dh_pub->neg) { |
179 | logit("invalid public DH value: negativ"); | 179 | log("invalid public DH value: negativ"); |
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | for (i = 0; i <= n; i++) | 182 | for (i = 0; i <= n; i++) |
@@ -187,7 +187,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) | |||
187 | /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ | 187 | /* if g==2 and bits_set==1 then computing log_g(dh_pub) is trivial */ |
188 | if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1)) | 188 | if (bits_set > 1 && (BN_cmp(dh_pub, dh->p) == -1)) |
189 | return 1; | 189 | return 1; |
190 | logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p)); | 190 | log("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p)); |
191 | return 0; | 191 | return 0; |
192 | } | 192 | } |
193 | 193 | ||