]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Remove redundant field of definition check
authortb@openbsd.org <tb@openbsd.org>
Tue, 3 Dec 2024 15:53:51 +0000 (15:53 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 14 Mar 2025 02:02:20 +0000 (13:02 +1100)
This will allow us to get rid of EC_GROUP_method_of() in the near future.

ok djm

OpenBSD-Commit-ID: b4a3d2e00990cf5c2ec6881c21ddca67327c2df8

sshkey.c

index 1db83788d894684f9f13dbb15d8244702e72e182..44be674d102b108d70d79466765d2341f10c4885 100644 (file)
--- a/sshkey.c
+++ b/sshkey.c
@@ -2708,14 +2708,6 @@ sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public)
         * EC_POINT_oct2point then the caller will need to explicitly check.
         */
 
-       /*
-        * We shouldn't ever hit this case because bignum_get_ecpoint()
-        * refuses to load GF2m points.
-        */
-       if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
-           NID_X9_62_prime_field)
-               goto out;
-
        /* Q != infinity */
        if (EC_POINT_is_at_infinity(group, public))
                goto out;
@@ -2815,11 +2807,6 @@ sshkey_dump_ec_point(const EC_GROUP *group, const EC_POINT *point)
                fprintf(stderr, "%s: BN_new failed\n", __func__);
                goto out;
        }
-       if (EC_METHOD_get_field_type(EC_GROUP_method_of(group)) !=
-           NID_X9_62_prime_field) {
-               fprintf(stderr, "%s: group is not a prime field\n", __func__);
-               goto out;
-       }
        if (EC_POINT_get_affine_coordinates_GFp(group, point,
            x, y, NULL) != 1) {
                fprintf(stderr, "%s: EC_POINT_get_affine_coordinates_GFp\n",