diff options
author | tb <> | 2023-04-17 21:00:35 +0000 |
---|---|---|
committer | tb <> | 2023-04-17 21:00:35 +0000 |
commit | 97906ee7352c1e7accc42f05543e84c94022d30f (patch) | |
tree | 654a29447d4781637594933b83b5bf90c7507afe | |
parent | 316e7ffc01ae11055fe34fde666de0555cb17d73 (diff) | |
download | openbsd-97906ee7352c1e7accc42f05543e84c94022d30f.tar.gz openbsd-97906ee7352c1e7accc42f05543e84c94022d30f.tar.bz2 openbsd-97906ee7352c1e7accc42f05543e84c94022d30f.zip |
Skip binary curves in ec_point_conversion
-rw-r--r-- | src/regress/lib/libcrypto/ec/ec_point_conversion.c | 17 |
1 files changed, 14 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 dca35ced59..1b40ddc2eb 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.10 2023/04/17 20:41:02 tb Exp $ */ | 1 | /* $OpenBSD: ec_point_conversion.c,v 1.11 2023/04/17 21:00:35 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> |
@@ -155,12 +155,23 @@ test_random_points_on_curve(EC_builtin_curve *curve) | |||
155 | BIGNUM *order = NULL; | 155 | BIGNUM *order = NULL; |
156 | BIGNUM *random; | 156 | BIGNUM *random; |
157 | BIGNUM *x, *y; | 157 | BIGNUM *x, *y; |
158 | const char *curve_name; | ||
158 | size_t i, j; | 159 | size_t i, j; |
159 | int failed = 0; | 160 | int failed = 0; |
160 | 161 | ||
161 | fprintf(stderr, "%s\n", OBJ_nid2sn(curve->nid)); | 162 | curve_name = OBJ_nid2sn(curve->nid); |
162 | if ((group = EC_GROUP_new_by_curve_name(curve->nid)) == NULL) | 163 | if ((group = EC_GROUP_new_by_curve_name(curve->nid)) == NULL) |
163 | errx(1, "EC_GROUP_new_by_curve_name"); | 164 | errx(1, "EC_GROUP_new_by_curve_name(%s)", curve_name); |
165 | |||
166 | #ifndef OPENSSL_NO_EC2M | ||
167 | if (EC_GROUP_get_basis_type(group)) { | ||
168 | EC_GROUP_free(group); | ||
169 | fprintf(stderr, "%s ... skipped\n", curve_name); | ||
170 | return 0; | ||
171 | } | ||
172 | #endif | ||
173 | |||
174 | fprintf(stderr, "%s\n", curve_name); | ||
164 | 175 | ||
165 | if ((order = BN_new()) == NULL) | 176 | if ((order = BN_new()) == NULL) |
166 | errx(1, "BN_new order"); | 177 | errx(1, "BN_new order"); |