From owner-svn-src-projects@freebsd.org Wed Sep 19 07:09:10 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEA81091C2C for ; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F4B674A05; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 249633AFF; Wed, 19 Sep 2018 07:09:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8J79AbD072206; Wed, 19 Sep 2018 07:09:10 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8J79A0e072205; Wed, 19 Sep 2018 07:09:10 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201809190709.w8J79A0e072205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 19 Sep 2018 07:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r338785 - projects/openssl111/usr.bin/factor X-SVN-Group: projects X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: projects/openssl111/usr.bin/factor X-SVN-Commit-Revision: 338785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2018 07:09:10 -0000 Author: jkim Date: Wed Sep 19 07:09:09 2018 New Revision: 338785 URL: https://svnweb.freebsd.org/changeset/base/338785 Log: Make factor(6) buildable. Modified: projects/openssl111/usr.bin/factor/factor.c Modified: projects/openssl111/usr.bin/factor/factor.c ============================================================================== --- projects/openssl111/usr.bin/factor/factor.c Wed Sep 19 07:08:27 2018 (r338784) +++ projects/openssl111/usr.bin/factor/factor.c Wed Sep 19 07:09:09 2018 (r338785) @@ -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);