diff options
Diffstat (limited to 'dh.c')
-rw-r--r-- | dh.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "includes.h" | 25 | #include "includes.h" |
26 | RCSID("$OpenBSD: dh.c,v 1.22 2002/06/27 08:49:44 markus Exp $"); | 26 | RCSID("$OpenBSD: dh.c,v 1.23 2002/11/21 22:22:50 markus Exp $"); |
27 | 27 | ||
28 | #include "xmalloc.h" | 28 | #include "xmalloc.h" |
29 | 29 | ||
@@ -182,7 +182,7 @@ dh_pub_is_valid(DH *dh, BIGNUM *dh_pub) | |||
182 | for (i = 0; i <= n; i++) | 182 | for (i = 0; i <= n; i++) |
183 | if (BN_is_bit_set(dh_pub, i)) | 183 | if (BN_is_bit_set(dh_pub, i)) |
184 | bits_set++; | 184 | bits_set++; |
185 | debug("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); | 185 | debug2("bits set: %d/%d", bits_set, BN_num_bits(dh->p)); |
186 | 186 | ||
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)) |
@@ -214,7 +214,7 @@ dh_gen_key(DH *dh, int need) | |||
214 | for (i = 0; i <= BN_num_bits(dh->priv_key); i++) | 214 | for (i = 0; i <= BN_num_bits(dh->priv_key); i++) |
215 | if (BN_is_bit_set(dh->priv_key, i)) | 215 | if (BN_is_bit_set(dh->priv_key, i)) |
216 | bits_set++; | 216 | bits_set++; |
217 | debug("dh_gen_key: priv key bits set: %d/%d", | 217 | debug2("dh_gen_key: priv key bits set: %d/%d", |
218 | bits_set, BN_num_bits(dh->priv_key)); | 218 | bits_set, BN_num_bits(dh->priv_key)); |
219 | if (tries++ > 10) | 219 | if (tries++ > 10) |
220 | fatal("dh_gen_key: too many bad keys: giving up"); | 220 | fatal("dh_gen_key: too many bad keys: giving up"); |