diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2019-10-06 17:21:16 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2019-10-14 22:54:02 +0200 |
commit | 42619397eb5db1a77d077250b0841b9c9f2b8984 (patch) | |
tree | d8afd9cabeedfe4cade8580206ed323bd6f4b9d0 /test/bntest.c | |
parent | 6c4ae41f1ca857254fc9e27edead81ff2fd3f3fe (diff) |
Add BN_check_prime()
Add a new API to test for primes that can't be misused, deprecated the
old APIs.
Suggested by Jake Massimo and Kenneth Paterson
Reviewed-by: Paul Dale <paul.dale@oracle.com>
GH: #9272
Diffstat (limited to 'test/bntest.c')
-rw-r--r-- | test/bntest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/bntest.c b/test/bntest.c index c3d6b933a5..07b8aade37 100644 --- a/test/bntest.c +++ b/test/bntest.c @@ -2312,7 +2312,7 @@ static int test_is_prime(int i) for (trial = 0; trial <= 1; ++trial) { if (!TEST_true(BN_set_word(r, primes[i])) - || !TEST_int_eq(BN_is_prime_fasttest_ex(r, 1, ctx, trial, NULL), + || !TEST_int_eq(BN_check_prime(r, ctx, NULL), 1)) goto err; } @@ -2336,7 +2336,7 @@ static int test_not_prime(int i) for (trial = 0; trial <= 1; ++trial) { if (!TEST_true(BN_set_word(r, not_primes[i])) - || !TEST_false(BN_is_prime_fasttest_ex(r, 1, ctx, trial, NULL))) + || !TEST_false(BN_check_prime(r, ctx, NULL))) goto err; } |