From c9d1fabebf3d065bd44479eb00b664bc42325f64 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 26 Apr 2023 09:31:12 +0000 Subject: [PATCH] Some more EC2M cleanup --- .../lib/libcrypto/ec/ec_point_conversion.c | 17 ++------- regress/lib/libcrypto/ecdh/ecdhtest.c | 35 +------------------ 2 files changed, 4 insertions(+), 48 deletions(-) diff --git a/regress/lib/libcrypto/ec/ec_point_conversion.c b/regress/lib/libcrypto/ec/ec_point_conversion.c index 398f8686157..e65e686da7b 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.12 2023/04/18 08:05:18 tb Exp $ */ +/* $OpenBSD: ec_point_conversion.c,v 1.13 2023/04/26 09:31:12 tb Exp $ */ /* * Copyright (c) 2021 Theo Buehler * Copyright (c) 2021 Joel Sing @@ -118,23 +118,12 @@ test_random_points_on_curve(EC_builtin_curve *curve) BIGNUM *order = NULL; BIGNUM *random; BIGNUM *x, *y; - const char *curve_name; size_t i, j; int failed = 0; - curve_name = OBJ_nid2sn(curve->nid); if ((group = EC_GROUP_new_by_curve_name(curve->nid)) == NULL) - errx(1, "EC_GROUP_new_by_curve_name(%s)", curve_name); - -#ifndef OPENSSL_NO_EC2M - if (EC_GROUP_get_basis_type(group)) { - EC_GROUP_free(group); - fprintf(stderr, "%s ... skipped\n", curve_name); - return 0; - } -#endif - - fprintf(stderr, "%s\n", curve_name); + errx(1, "EC_GROUP_new_by_curve_name(%s)", + OBJ_nid2sn(curve->nid)); if ((order = BN_new()) == NULL) errx(1, "BN_new order"); diff --git a/regress/lib/libcrypto/ecdh/ecdhtest.c b/regress/lib/libcrypto/ecdh/ecdhtest.c index bf68a88e4ed..e6046a54004 100644 --- a/regress/lib/libcrypto/ecdh/ecdhtest.c +++ b/regress/lib/libcrypto/ecdh/ecdhtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecdhtest.c,v 1.13 2023/03/08 16:51:42 tb Exp $ */ +/* $OpenBSD: ecdhtest.c,v 1.14 2023/04/26 09:31:12 tb Exp $ */ /* ==================================================================== * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. * @@ -407,39 +407,6 @@ main(int argc, char *argv[]) goto err; if (!test_ecdh_curve(NID_secp521r1, "NIST Prime-Curve P-521", ctx, out)) goto err; -#ifndef OPENSSL_NO_EC2M - /* NIST BINARY CURVES TESTS */ - if (!test_ecdh_curve(NID_sect163k1, "NIST Binary-Curve K-163", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect163r2, "NIST Binary-Curve B-163", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect233k1, "NIST Binary-Curve K-233", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect233r1, "NIST Binary-Curve B-233", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect283k1, "NIST Binary-Curve K-283", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect283r1, "NIST Binary-Curve B-283", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect409k1, "NIST Binary-Curve K-409", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect409r1, "NIST Binary-Curve B-409", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect571k1, "NIST Binary-Curve K-571", - ctx, out)) - goto err; - if (!test_ecdh_curve(NID_sect571r1, "NIST Binary-Curve B-571", - ctx, out)) - goto err; -#endif if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP256r1", 256)) goto err; if (!test_ecdh_kat(out, "Brainpool Prime-Curve brainpoolP384r1", 384)) -- 2.20.1