From 97a1e4556e358ccbb109b1616615061cd9777905 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 21 Jan 2025 15:45:13 +0000 Subject: bn_test: use BN_RECP_CTX_create() rather than _new()/_set() --- src/regress/lib/libcrypto/bn/bn_test.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/bn/bn_test.c b/src/regress/lib/libcrypto/bn/bn_test.c index f73799b3a8..d3fe485ec8 100644 --- a/src/regress/lib/libcrypto/bn/bn_test.c +++ b/src/regress/lib/libcrypto/bn/bn_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_test.c,v 1.19 2023/04/25 17:17:21 tb Exp $ */ +/* $OpenBSD: bn_test.c,v 1.20 2025/01/21 15:45:13 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -581,9 +581,6 @@ test_div_recp(BIO *bp, BN_CTX *ctx) if ((e = BN_CTX_get(ctx)) == NULL) goto err; - if ((recp = BN_RECP_CTX_new()) == NULL) - goto err; - for (i = 0; i < num0 + num1; i++) { if (i < num1) { CHECK_GOTO(BN_bntest_rand(a, 400, 0, 0)); @@ -594,7 +591,8 @@ test_div_recp(BIO *bp, BN_CTX *ctx) CHECK_GOTO(BN_bntest_rand(b, 50 + 3 * (i - num1), 0, 0)); BN_set_negative(a, rand_neg()); BN_set_negative(b, rand_neg()); - CHECK_GOTO(BN_RECP_CTX_set(recp, b, ctx)); + BN_RECP_CTX_free(recp); + CHECK_GOTO(recp = BN_RECP_CTX_create(b)); CHECK_GOTO(BN_div_recp(d, c, a, recp, ctx)); if (bp != NULL) { if (!results) { -- cgit v1.2.3-55-g6feb