diff options
| author | tb <> | 2023-04-07 22:25:09 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-07 22:25:09 +0000 |
| commit | efcd36394bde8d089bbaa5acd1be78b39c13f48e (patch) | |
| tree | c553ea2a524f4929914ee64e25fbba57532f0750 /src | |
| parent | bed71e5db529fb1f01af62eb29eebb2d03ddf679 (diff) | |
| download | openbsd-efcd36394bde8d089bbaa5acd1be78b39c13f48e.tar.gz openbsd-efcd36394bde8d089bbaa5acd1be78b39c13f48e.tar.bz2 openbsd-efcd36394bde8d089bbaa5acd1be78b39c13f48e.zip | |
bn_test: use bn_copy() instead of BN_free/BN_dup
This is not only simpler but also required by an upcoming change.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/bn/bn_test.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/bn/bn_test.c b/src/regress/lib/libcrypto/bn/bn_test.c index 57068a10c1..a5fe58f55a 100644 --- a/src/regress/lib/libcrypto/bn/bn_test.c +++ b/src/regress/lib/libcrypto/bn/bn_test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_test.c,v 1.7 2023/04/07 22:23:31 tb Exp $ */ | 1 | /* $OpenBSD: bn_test.c,v 1.8 2023/04/07 22:25:09 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1410,8 +1410,7 @@ test_mod_exp_mont5(BIO *bp, BN_CTX *ctx) | |||
| 1410 | "0000000000000000000000000000000000000000000000000000000000000000" | 1410 | "0000000000000000000000000000000000000000000000000000000000000000" |
| 1411 | "000000000000000000000000000000000000000000FFFFFFFFFFFFFF00000000"); | 1411 | "000000000000000000000000000000000000000000FFFFFFFFFFFFFF00000000"); |
| 1412 | CHECK_GOTO(len); | 1412 | CHECK_GOTO(len); |
| 1413 | BN_free(b); | 1413 | CHECK_GOTO(bn_copy(b, a)); |
| 1414 | CHECK_GOTO(b = BN_dup(a)); | ||
| 1415 | CHECK_GOTO(BN_MONT_CTX_set(mont, n, ctx)); | 1414 | CHECK_GOTO(BN_MONT_CTX_set(mont, n, ctx)); |
| 1416 | CHECK_GOTO(BN_mod_mul_montgomery(c, a, a, mont, ctx)); | 1415 | CHECK_GOTO(BN_mod_mul_montgomery(c, a, a, mont, ctx)); |
| 1417 | CHECK_GOTO(BN_mod_mul_montgomery(d, a, b, mont, ctx)); | 1416 | CHECK_GOTO(BN_mod_mul_montgomery(d, a, b, mont, ctx)); |
