diff options
| author | tb <> | 2023-04-18 08:17:49 +0000 |
|---|---|---|
| committer | tb <> | 2023-04-18 08:17:49 +0000 |
| commit | 87b9736b2a0fa7d88c9287a2aa1bcc757372e73c (patch) | |
| tree | 32a3113245d5a34a44ed0af27788486f0b2f78fd | |
| parent | 42fa556f70e00f4b863280d529915d25ce4dad17 (diff) | |
| download | openbsd-87b9736b2a0fa7d88c9287a2aa1bcc757372e73c.tar.gz openbsd-87b9736b2a0fa7d88c9287a2aa1bcc757372e73c.tar.bz2 openbsd-87b9736b2a0fa7d88c9287a2aa1bcc757372e73c.zip | |
ectest: drop a broken #if 0 /* optional */ piece of code
This places a point at infinity and then fails. Fix some wacky indentation
in the vicinity.
| -rw-r--r-- | src/regress/lib/libcrypto/ec/ectest.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c index 4f412d64e6..9140b7e94a 100644 --- a/src/regress/lib/libcrypto/ec/ectest.c +++ b/src/regress/lib/libcrypto/ec/ectest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ectest.c,v 1.16 2023/04/18 07:56:58 tb Exp $ */ | 1 | /* $OpenBSD: ectest.c,v 1.17 2023/04/18 08:17:49 tb Exp $ */ |
| 2 | /* crypto/ec/ectest.c */ | 2 | /* crypto/ec/ectest.c */ |
| 3 | /* | 3 | /* |
| 4 | * Originally written by Bodo Moeller for the OpenSSL project. | 4 | * Originally written by Bodo Moeller for the OpenSSL project. |
| @@ -273,8 +273,7 @@ prime_field_tests(void) | |||
| 273 | 273 | ||
| 274 | fprintf(stdout, "A cyclic subgroup:\n"); | 274 | fprintf(stdout, "A cyclic subgroup:\n"); |
| 275 | k = 100; | 275 | k = 100; |
| 276 | do | 276 | do { |
| 277 | { | ||
| 278 | if (k-- == 0) | 277 | if (k-- == 0) |
| 279 | ABORT; | 278 | ABORT; |
| 280 | 279 | ||
| @@ -295,24 +294,10 @@ prime_field_tests(void) | |||
| 295 | ABORT; | 294 | ABORT; |
| 296 | if (!EC_POINT_add(group, P, P, Q, ctx)) | 295 | if (!EC_POINT_add(group, P, P, Q, ctx)) |
| 297 | ABORT; | 296 | ABORT; |
| 297 | } while (!EC_POINT_is_at_infinity(group, P)); | ||
| 298 | 298 | ||
| 299 | #if 0 /* optional */ | 299 | if (!EC_POINT_add(group, P, Q, R, ctx)) |
| 300 | { | 300 | ABORT; |
| 301 | EC_POINT *points[3]; | ||
| 302 | |||
| 303 | points[0] = R; | ||
| 304 | points[1] = Q; | ||
| 305 | points[2] = P; | ||
| 306 | if (!EC_POINTs_make_affine(group, 2, points, ctx)) | ||
| 307 | ABORT; | ||
| 308 | } | ||
| 309 | #endif | ||
| 310 | |||
| 311 | } | ||
| 312 | while (!EC_POINT_is_at_infinity(group, P)); | ||
| 313 | |||
| 314 | if (!EC_POINT_add(group, P, Q, R, ctx)) | ||
| 315 | ABORT; | ||
| 316 | if (!EC_POINT_is_at_infinity(group, P)) | 301 | if (!EC_POINT_is_at_infinity(group, P)) |
| 317 | ABORT; | 302 | ABORT; |
| 318 | 303 | ||
