summaryrefslogtreecommitdiff
path: root/moduli.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-11-20 15:15:49 +1100
committerDamien Miller <djm@mindrot.org>2010-11-20 15:15:49 +1100
commit4499f4cc20eee7e0f67b35f5a5c6078bf07dcbc0 (patch)
treef4d827008f691988ecb163d0748648e10f2b0c25 /moduli.c
parent7a221a159188eceeea366d4f58345d2bdccaeb8d (diff)
- djm@cvs.openbsd.org 2010/11/10 01:33:07
[kexdhc.c kexdhs.c kexgexc.c kexgexs.c key.c moduli.c] use only libcrypto APIs that are retained with OPENSSL_NO_DEPRECATED. these have been around for years by this time. ok markus
Diffstat (limited to 'moduli.c')
-rw-r--r--moduli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/moduli.c b/moduli.c
index f737cb3f5..2c2b388c7 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: moduli.c,v 1.21 2008/06/26 09:19:40 djm Exp $ */ 1/* $OpenBSD: moduli.c,v 1.22 2010/11/10 01:33:07 djm Exp $ */
2/* 2/*
3 * Copyright 1994 Phil Karn <karn@qualcomm.com> 3 * Copyright 1994 Phil Karn <karn@qualcomm.com>
4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> 4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -600,7 +600,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
600 * that p is also prime. A single pass will weed out the 600 * that p is also prime. A single pass will weed out the
601 * vast majority of composite q's. 601 * vast majority of composite q's.
602 */ 602 */
603 if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) { 603 if (BN_is_prime_ex(q, 1, ctx, NULL) <= 0) {
604 debug("%10u: q failed first possible prime test", 604 debug("%10u: q failed first possible prime test",
605 count_in); 605 count_in);
606 continue; 606 continue;
@@ -613,14 +613,14 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted)
613 * will show up on the first Rabin-Miller iteration so it 613 * will show up on the first Rabin-Miller iteration so it
614 * doesn't hurt to specify a high iteration count. 614 * doesn't hurt to specify a high iteration count.
615 */ 615 */
616 if (!BN_is_prime(p, trials, NULL, ctx, NULL)) { 616 if (!BN_is_prime_ex(p, trials, ctx, NULL)) {
617 debug("%10u: p is not prime", count_in); 617 debug("%10u: p is not prime", count_in);
618 continue; 618 continue;
619 } 619 }
620 debug("%10u: p is almost certainly prime", count_in); 620 debug("%10u: p is almost certainly prime", count_in);
621 621
622 /* recheck q more rigorously */ 622 /* recheck q more rigorously */
623 if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) { 623 if (!BN_is_prime_ex(q, trials - 1, ctx, NULL)) {
624 debug("%10u: q is not prime", count_in); 624 debug("%10u: q is not prime", count_in);
625 continue; 625 continue;
626 } 626 }