From 5ecff87d666f47d0003b106c61ada1e25655b81d Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 21 Jun 2017 13:55:02 +0100 Subject: BN_pseudo_rand is really BN_rand And BN_pseudo_rand_range is really BN_rand_range. Document that we might deprecate those functions. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/3743) --- test/ectest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/ectest.c') diff --git a/test/ectest.c b/test/ectest.c index 351fefd..c6e60ac 100644 --- a/test/ectest.c +++ b/test/ectest.c @@ -577,7 +577,7 @@ static int prime_field_tests(void) || !TEST_true(EC_POINTs_mul(group, R, z, 2, points, scalars, ctx)) || !TEST_int_eq(0, EC_POINT_cmp(group, P, R, ctx)) || !TEST_int_eq(0, EC_POINT_cmp(group, R, Q, ctx)) - || !TEST_true(BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) + || !TEST_true(BN_rand(y, BN_num_bits(y), 0, 0)) || !TEST_true(BN_add(z, z, y))) goto err; BN_set_negative(z, 1); @@ -586,7 +586,7 @@ static int prime_field_tests(void) if (!TEST_true(EC_POINTs_mul(group, P, NULL, 2, points, scalars, ctx)) || !TEST_true(EC_POINT_is_at_infinity(group, P)) - || !TEST_true(BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) + || !TEST_true(BN_rand(x, BN_num_bits(y) - 1, 0, 0)) || !TEST_true(BN_add(z, x, y))) goto err; BN_set_negative(z, 1); @@ -921,7 +921,7 @@ static int char2_curve_test(int n) || !TEST_int_eq(0, EC_POINT_cmp(group, R, Q, ctx))) goto err; - if (!TEST_true(BN_pseudo_rand(y, BN_num_bits(y), 0, 0)) + if (!TEST_true(BN_rand(y, BN_num_bits(y), 0, 0)) || !TEST_true(BN_add(z, z, y))) goto err; BN_set_negative(z, 1); @@ -932,7 +932,7 @@ static int char2_curve_test(int n) || !TEST_true(EC_POINT_is_at_infinity(group, P))) goto err; - if (!TEST_true(BN_pseudo_rand(x, BN_num_bits(y) - 1, 0, 0)) + if (!TEST_true(BN_rand(x, BN_num_bits(y) - 1, 0, 0)) || !TEST_true(BN_add(z, x, y))) goto err; BN_set_negative(z, 1); -- cgit v1.1