diff options
| author | tb <> | 2023-04-17 20:41:02 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-17 20:41:02 +0000 |
| commit | 9735a5cd80d7295b8ed91d5ec231858b7dc5fb0b (patch) | |
| tree | 2d4bc1a41e1a091f0b213dcc127344031ee0119d /src/regress/lib/libcrypto/ec/ec_point_conversion.c | |
| parent | ba82a990c7c41b90159bf0f2fe6d6bdca17a8359 (diff) | |
| download | openbsd-9735a5cd80d7295b8ed91d5ec231858b7dc5fb0b.tar.gz openbsd-9735a5cd80d7295b8ed91d5ec231858b7dc5fb0b.tar.bz2 openbsd-9735a5cd80d7295b8ed91d5ec231858b7dc5fb0b.zip | |
Switch all ec tests to using dynamic linking
This only requires very minor changes and simplifies testing quite a bit.
Some of the changes can be undone after the next bump.
Diffstat (limited to 'src/regress/lib/libcrypto/ec/ec_point_conversion.c')
| -rw-r--r-- | src/regress/lib/libcrypto/ec/ec_point_conversion.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/ec/ec_point_conversion.c b/src/regress/lib/libcrypto/ec/ec_point_conversion.c index 5a97f67b94..dca35ced59 100644 --- a/src/regress/lib/libcrypto/ec/ec_point_conversion.c +++ b/src/regress/lib/libcrypto/ec/ec_point_conversion.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ec_point_conversion.c,v 1.9 2023/04/15 21:53:38 tb Exp $ */ | 1 | /* $OpenBSD: ec_point_conversion.c,v 1.10 2023/04/17 20:41:02 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2021 Theo Buehler <tb@openbsd.org> |
| 4 | * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2021 Joel Sing <jsing@openbsd.org> |
| @@ -177,8 +177,10 @@ test_random_points_on_curve(EC_builtin_curve *curve) | |||
| 177 | for (i = 0; i < N_RANDOM_POINTS; i++) { | 177 | for (i = 0; i < N_RANDOM_POINTS; i++) { |
| 178 | EC_POINT *random_point; | 178 | EC_POINT *random_point; |
| 179 | 179 | ||
| 180 | if (!bn_rand_interval(random, BN_value_one(), order)) | 180 | do { |
| 181 | errx(1, "bn_rand_interval"); | 181 | if (!BN_rand_range(random, order)) |
| 182 | errx(1, "BN_rand_range"); | ||
| 183 | } while (BN_is_zero(random)); | ||
| 182 | 184 | ||
| 183 | if ((random_point = EC_POINT_new(group)) == NULL) | 185 | if ((random_point = EC_POINT_new(group)) == NULL) |
| 184 | errx(1, "EC_POINT_new"); | 186 | errx(1, "EC_POINT_new"); |
