Module Name: src
Committed By: christos
Date: Tue Feb 6 19:32:49 UTC 2018
Modified Files:
src/usr.bin/moduli/qsafe: qsafe.c
Log Message:
use BN_is_prime_ex
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/moduli/qsafe/qsafe.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/moduli/qsafe/qsafe.c
diff -u src/usr.bin/moduli/qsafe/qsafe.c:1.3 src/usr.bin/moduli/qsafe/qsafe.c:1.4
--- src/usr.bin/moduli/qsafe/qsafe.c:1.3 Sun Sep 4 16:55:43 2011
+++ src/usr.bin/moduli/qsafe/qsafe.c Tue Feb 6 14:32:49 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: qsafe.c,v 1.3 2011/09/04 20:55:43 joerg Exp $ */
+/* $NetBSD: qsafe.c,v 1.4 2018/02/06 19:32:49 christos Exp $ */
/*-
* Copyright 1994 Phil Karn <[email protected]>
@@ -254,7 +254,7 @@ main(int argc, char *argv[])
* single pass will weed out the vast majority of composite
* q's.
*/
- if (BN_is_prime(q, 1, NULL, ctx, NULL) <= 0) {
+ if (BN_is_prime_ex(q, 1, ctx, NULL) <= 0) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: q failed first "
"possible prime test\n", count_in);
@@ -269,7 +269,7 @@ main(int argc, char *argv[])
* the first Rabin-Miller iteration so it doesn't hurt to
* specify a high iteration count.
*/
- if (!BN_is_prime(p, trials, NULL, ctx, NULL)) {
+ if (!BN_is_prime_ex(p, trials, ctx, NULL)) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: p is not prime\n",
count_in);
@@ -283,7 +283,7 @@ main(int argc, char *argv[])
#endif
/* recheck q more rigorously */
- if (!BN_is_prime(q, trials - 1, NULL, ctx, NULL)) {
+ if (!BN_is_prime_ex(q, trials - 1, ctx, NULL)) {
#ifdef DEBUGPRINT
(void)fprintf(stderr, "%10lu: q is not prime\n",
count_in);