diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2018-09-19 07:09:09 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2018-09-19 07:09:09 +0000 |
commit | 3ce33da625d028cf4b41ec2662426596955572d0 (patch) | |
tree | c9770e192fadf0d05683dde4eef62ff2a515512f /usr.bin/factor/factor.c | |
parent | ee4526c085c75e053e447baaedd9ee7920f08951 (diff) |
Make factor(6) buildable.
Notes
Notes:
svn path=/projects/openssl111/; revision=338785
Diffstat (limited to 'usr.bin/factor/factor.c')
-rw-r--r-- | usr.bin/factor/factor.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c index 19fe830ca59d..8908b2530f9b 100644 --- a/usr.bin/factor/factor.c +++ b/usr.bin/factor/factor.c @@ -215,8 +215,7 @@ pr_fact(BIGNUM *val) if (!BN_sqr(bnfact, bnfact, ctx)) errx(1, "error in BN_sqr()"); 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) pr_print(val); else pollard_pminus1(val); @@ -289,8 +288,7 @@ newbase: errx(1, "error in BN_gcd()"); if (!BN_is_one(x)) { - if (BN_is_prime(x, PRIME_CHECKS, NULL, NULL, - NULL) == 1) + if (BN_is_prime_ex(x, PRIME_CHECKS, NULL, NULL) == 1) pr_print(x); else pollard_pminus1(x); @@ -299,7 +297,7 @@ newbase: BN_div(num, NULL, val, x, ctx); if (BN_is_one(num)) return; - if (BN_is_prime(num, PRIME_CHECKS, NULL, NULL, + if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL) == 1) { pr_print(num); fflush(stdout); |