From: tb Date: Sat, 25 Mar 2023 09:23:44 +0000 (+0000) Subject: Guard GF2m-specifics with OPENSSL_NO_EC2M X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=182955b378782dc8f2f72d55d17d47fe2ba4b7dd;p=openbsd Guard GF2m-specifics with OPENSSL_NO_EC2M --- diff --git a/regress/lib/libcrypto/ec/ec_point_conversion.c b/regress/lib/libcrypto/ec/ec_point_conversion.c index 04177a0e87e..a32bdbda434 100644 --- a/regress/lib/libcrypto/ec/ec_point_conversion.c +++ b/regress/lib/libcrypto/ec/ec_point_conversion.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_point_conversion.c,v 1.7 2022/12/01 13:49:12 tb Exp $ */ +/* $OpenBSD: ec_point_conversion.c,v 1.8 2023/03/25 09:23:44 tb Exp $ */ /* * Copyright (c) 2021 Theo Buehler * Copyright (c) 2021 Joel Sing @@ -109,6 +109,7 @@ roundtrip(EC_GROUP *group, EC_POINT *point, int form, BIGNUM *x, BIGNUM *y) return failed; } +#ifndef OPENSSL_NO_EC2M static int test_hybrid_corner_case(void) { @@ -143,6 +144,7 @@ test_hybrid_corner_case(void) return failed; } +#endif /* XXX This only tests multiples of the generator for now... */ static int @@ -242,6 +244,7 @@ static const struct point_conversion { uint8_t octets_len; int valid; } point_conversions[] = { +#ifndef OPENSSL_NO_EC2M { .description = "point at infinity on sect571k1", .nid = NID_sect571k1, @@ -549,7 +552,7 @@ static const struct point_conversion { .octets_len = 145, .valid = 0, }, - +#endif { .description = "point at infinity on secp256r1", .nid = NID_X9_62_prime256v1, @@ -880,7 +883,9 @@ main(int argc, char **argv) int failed = 0; failed |= test_random_points(); +#ifndef OPENSSL_NO_EC2M failed |= test_hybrid_corner_case(); +#endif failed |= test_point_conversions(); return failed;