summaryrefslogtreecommitdiffstats
path: root/factor
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2018-02-06 16:53:27 +0000
committerchristos <christos@NetBSD.org>2018-02-06 16:53:27 +0000
commitf10f12c30fc0f088e947a4836f528ac1d880664a (patch)
treeaf6fe45ac8cbaf41c68905a1485fe7bb24990e72 /factor
parentcb493735fd2604c5b7b2c82b9811302b5d58ef9d (diff)
downloadbsdgames-darwin-f10f12c30fc0f088e947a4836f528ac1d880664a.tar.gz
bsdgames-darwin-f10f12c30fc0f088e947a4836f528ac1d880664a.tar.zst
bsdgames-darwin-f10f12c30fc0f088e947a4836f528ac1d880664a.zip
fix for OpenSSL-1.1
Diffstat (limited to 'factor')
-rw-r--r--factor/factor.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/factor/factor.c b/factor/factor.c
index ac8233ce..26aeeba7 100644
--- a/factor/factor.c
+++ b/factor/factor.c
@@ -1,4 +1,4 @@
-/* $NetBSD: factor.c,v 1.28 2017/11/11 23:48:44 rin Exp $ */
+/* $NetBSD: factor.c,v 1.29 2018/02/06 16:53:27 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
#if 0
static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: factor.c,v 1.28 2017/11/11 23:48:44 rin Exp $");
+__RCSID("$NetBSD: factor.c,v 1.29 2018/02/06 16:53:27 christos Exp $");
#endif
#endif /* not lint */
@@ -234,8 +234,8 @@ pr_fact(BIGNUM *val, int hflag)
BN_set_word(bnfact, (BN_ULONG)*(fact - 1));
BN_sqr(bnfact, bnfact, ctx);
if (BN_cmp(bnfact, val) > 0
- || BN_is_prime(val, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ || BN_is_prime_ex(val, PRIME_CHECKS, NULL, NULL)
+ == 1) {
putchar(' ');
BN_print_dec_fp(stdout, val);
} else
@@ -326,8 +326,8 @@ restart:
BN_gcd(tmp, tmp, val, ctx);
if (!BN_is_one(tmp)) {
- if (BN_is_prime(tmp, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ if (BN_is_prime_ex(tmp, PRIME_CHECKS, NULL, NULL) == 1)
+ {
putchar(' ');
BN_print_dec_fp(stdout, tmp);
} else {
@@ -346,8 +346,8 @@ restart:
BN_div(num, NULL, val, tmp, ctx);
if (BN_is_one(num))
return;
- if (BN_is_prime(num, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL) == 1)
+ {
putchar(' ');
BN_print_dec_fp(stdout, num);
fflush(stdout);