From 571efe6d8561d2973b14ec192d6acf94551374c2 Mon Sep 17 00:00:00 2001 From: tb Date: Fri, 18 Oct 2024 10:50:26 +0000 Subject: [PATCH] Merge EC_GROUP_new_curve_GFp() with ec_group_new_curve() The latter was used for EC_GROUP_new_curve_GF2m() and is now pointless. ok jsing --- lib/libcrypto/ec/ec_cvt.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/lib/libcrypto/ec/ec_cvt.c b/lib/libcrypto/ec/ec_cvt.c index 5b196dd6719..87ec0830e21 100644 --- a/lib/libcrypto/ec/ec_cvt.c +++ b/lib/libcrypto/ec/ec_cvt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_cvt.c,v 1.12 2023/07/07 13:54:45 beck Exp $ */ +/* $OpenBSD: ec_cvt.c,v 1.13 2024/10/18 10:50:26 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -74,13 +74,13 @@ #include #include "ec_local.h" -static EC_GROUP * -ec_group_new_curve(const EC_METHOD *method, const BIGNUM *p, const BIGNUM *a, - const BIGNUM *b, BN_CTX *ctx) +EC_GROUP * +EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, + BN_CTX *ctx) { EC_GROUP *group; - if ((group = EC_GROUP_new(method)) == NULL) + if ((group = EC_GROUP_new(EC_GFp_mont_method())) == NULL) goto err; if (!EC_GROUP_set_curve(group, p, a, b, ctx)) @@ -93,11 +93,4 @@ ec_group_new_curve(const EC_METHOD *method, const BIGNUM *p, const BIGNUM *a, return NULL; } - -EC_GROUP * -EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, - BN_CTX *ctx) -{ - return ec_group_new_curve(EC_GFp_mont_method(), p, a, b, ctx); -} LCRYPTO_ALIAS(EC_GROUP_new_curve_GFp); -- 2.20.1