summaryrefslogtreecommitdiff
path: root/dh.c
diff options
context:
space:
mode:
Diffstat (limited to 'dh.c')
-rw-r--r--dh.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dh.c b/dh.c
index 1be51953c..996428b7f 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.23 2002/11/21 22:22:50 markus Exp $"); 26RCSID("$OpenBSD: dh.c,v 1.24 2003/04/08 20:21:28 itojun Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29 29
@@ -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 log("WARNING: %s does not exist, using old modulus", _PATH_DH_MODULI); 115 logit("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 log("WARNING: no suitable primes in %s", _PATH_DH_PRIMES); 143 logit("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 log("invalid public DH value: negativ"); 179 logit("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 log("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p)); 190 logit("invalid public DH value (%d/%d)", bits_set, BN_num_bits(dh->p));
191 return 0; 191 return 0;
192} 192}
193 193