[openssh-commits] [openssh] 01/04: upstream: Remove redundant field of definition check

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Dec 5 01:29:09 AEDT 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 30c746265ebde29806dba77c92fb1fd3803cbf5c
Author: tb at openbsd.org <tb at openbsd.org>
AuthorDate: Tue Dec 3 15:53:51 2024 +0000

    upstream: Remove redundant field of definition check
    
    This will allow us to get rid of EC_GROUP_method_of() in the near future.
    
    ok djm
    
    OpenBSD-Commit-ID: b4a3d2e00990cf5c2ec6881c21ddca67327c2df8
---
 sshkey.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/sshkey.c b/sshkey.c
index 73fb89ac..ab80752b 100644
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.147 2024/09/22 12:56:21 jsg Exp $ */
+/* $OpenBSD: sshkey.c,v 1.148 2024/12/03 15:53:51 tb Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Alexander von Gernler.  All rights reserved.
@@ -2705,14 +2705,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;
@@ -2812,11 +2804,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",

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list