summaryrefslogtreecommitdiff
path: root/src/regress
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress')
-rw-r--r--src/regress/lib/libcrypto/bn/bn_isqrt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_isqrt.c b/src/regress/lib/libcrypto/bn/bn_isqrt.c
index 2663bb74e9..d8a2d2755f 100644
--- a/src/regress/lib/libcrypto/bn/bn_isqrt.c
+++ b/src/regress/lib/libcrypto/bn/bn_isqrt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_isqrt.c,v 1.3 2023/03/08 06:28:08 tb Exp $ */ 1/* $OpenBSD: bn_isqrt.c,v 1.4 2023/08/03 18:53:56 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
4 * 4 *
@@ -194,8 +194,8 @@ isqrt_test(void)
194 if (!BN_set_bit(upper, UPPER_BITS)) 194 if (!BN_set_bit(upper, UPPER_BITS))
195 errx(1, "BN_set_bit(upper, %d)", UPPER_BITS); 195 errx(1, "BN_set_bit(upper, %d)", UPPER_BITS);
196 196
197 if (!bn_rand_interval(n, lower, upper)) 197 if (!bn_rand_in_range(n, lower, upper))
198 errx(1, "bn_rand_interval n"); 198 errx(1, "bn_rand_in_range n");
199 199
200 /* n_sqr = n^2 */ 200 /* n_sqr = n^2 */
201 if (!BN_sqr(n_sqr, n, ctx)) 201 if (!BN_sqr(n_sqr, n, ctx))
@@ -246,8 +246,8 @@ isqrt_test(void)
246 */ 246 */
247 247
248 for (i = 0; i < N_TESTS; i++) { 248 for (i = 0; i < N_TESTS; i++) {
249 if (!bn_rand_interval(testcase, n_sqr, upper)) 249 if (!bn_rand_in_range(testcase, n_sqr, upper))
250 errx(1, "bn_rand_interval testcase"); 250 errx(1, "bn_rand_in_range testcase");
251 251
252 if (!bn_isqrt(isqrt, &is_perfect_square, testcase, ctx)) 252 if (!bn_isqrt(isqrt, &is_perfect_square, testcase, ctx))
253 errx(1, "bn_isqrt testcase"); 253 errx(1, "bn_isqrt testcase");