Some more EC2M cleanup
authortb <tb@openbsd.org>
Wed, 26 Apr 2023 09:31:12 +0000 (09:31 +0000)
committertb <tb@openbsd.org>
Wed, 26 Apr 2023 09:31:12 +0000 (09:31 +0000)
regress/lib/libcrypto/ec/ec_point_conversion.c
regress/lib/libcrypto/ecdh/ecdhtest.c

index 398f868..e65e686 100644 (file)
@@ -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 <tb@openbsd.org>
  * Copyright (c) 2021 Joel Sing <jsing@openbsd.org>
@@ -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");
index bf68a88..e6046a5 100644 (file)
@@ -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))