From c6fb1b70190da4dea3f567f30626980c40ed2d0a Mon Sep 17 00:00:00 2001 From: tb Date: Sat, 19 Oct 2024 08:29:40 +0000 Subject: [PATCH] EC_GROUP_check(): zap useless comments --- lib/libcrypto/ec/ec_lib.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c index e17c4396f79..1918d0ba527 100644 --- a/lib/libcrypto/ec/ec_lib.c +++ b/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.71 2024/10/19 08:26:03 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.72 2024/10/19 08:29:40 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -614,12 +614,11 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) if (ctx == NULL) goto err; - /* check the discriminant */ if (!EC_GROUP_check_discriminant(group, ctx)) { ECerror(EC_R_DISCRIMINANT_IS_ZERO); goto err; } - /* check the generator */ + if (group->generator == NULL) { ECerror(EC_R_UNDEFINED_GENERATOR); goto err; @@ -628,7 +627,7 @@ EC_GROUP_check(const EC_GROUP *group, BN_CTX *ctx_in) ECerror(EC_R_POINT_IS_NOT_ON_CURVE); goto err; } - /* check the order of the generator */ + if ((point = EC_POINT_new(group)) == NULL) goto err; if ((order = EC_GROUP_get0_order(group)) == NULL) -- 2.20.1