diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-18 08:17:50 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-18 08:17:50 +0000 |
commit | 2c87517126efcb8a18496889d798975bf4c14aec (patch) | |
tree | b355e35460dab3f4ad24d2842c1992d2267f051e /regress/lib | |
parent | ac1b6ed27f0d0dae33c0c6f099af1e3f0f5de05e (diff) |
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.
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libcrypto/ec/ectest.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/regress/lib/libcrypto/ec/ectest.c b/regress/lib/libcrypto/ec/ectest.c index 4f412d64e6e..9140b7e94af 100644 --- a/regress/lib/libcrypto/ec/ectest.c +++ b/regress/lib/libcrypto/ec/ectest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ectest.c,v 1.16 2023/04/18 07:56:58 tb Exp $ */ +/* $OpenBSD: ectest.c,v 1.17 2023/04/18 08:17:49 tb Exp $ */ /* crypto/ec/ectest.c */ /* * Originally written by Bodo Moeller for the OpenSSL project. @@ -273,8 +273,7 @@ prime_field_tests(void) fprintf(stdout, "A cyclic subgroup:\n"); k = 100; - do - { + do { if (k-- == 0) ABORT; @@ -295,24 +294,10 @@ prime_field_tests(void) ABORT; if (!EC_POINT_add(group, P, P, Q, ctx)) ABORT; + } while (!EC_POINT_is_at_infinity(group, P)); -#if 0 /* optional */ - { - EC_POINT *points[3]; - - points[0] = R; - points[1] = Q; - points[2] = P; - if (!EC_POINTs_make_affine(group, 2, points, ctx)) - ABORT; - } -#endif - - } - while (!EC_POINT_is_at_infinity(group, P)); - - if (!EC_POINT_add(group, P, Q, R, ctx)) - ABORT; + if (!EC_POINT_add(group, P, Q, R, ctx)) + ABORT; if (!EC_POINT_is_at_infinity(group, P)) ABORT; |