From 61ec219ba890b4ccb6afa0c7a83d04623c81d719 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 10 May 2021 20:58:32 +0000 Subject: [PATCH] Replace unnecessary calls to EC_GROUP_get_curve_GF{p,2m}() with EC_GROUP_get_curve() and remove no longer needed prototypes. --- usr.bin/openssl/ecparam.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/usr.bin/openssl/ecparam.c b/usr.bin/openssl/ecparam.c index 611eef314d5..01974a7f466 100644 --- a/usr.bin/openssl/ecparam.c +++ b/usr.bin/openssl/ecparam.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecparam.c,v 1.20 2021/04/21 00:31:59 tb Exp $ */ +/* $OpenBSD: ecparam.c,v 1.21 2021/05/10 20:58:32 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -87,11 +87,6 @@ #include #include -int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, - BN_CTX *); -int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *, - BN_CTX *); - static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, unsigned char *); @@ -426,15 +421,8 @@ ecparam_main(int argc, char **argv) is_prime = (EC_METHOD_get_field_type(meth) == NID_X9_62_prime_field); - if (is_prime) { - if (!EC_GROUP_get_curve_GFp(group, ec_p, ec_a, - ec_b, NULL)) - goto end; - } else { - if (!EC_GROUP_get_curve_GF2m(group, ec_p, ec_a, - ec_b, NULL)) - goto end; - } + if (!EC_GROUP_get_curve(group, ec_p, ec_a, ec_b, NULL)) + goto end; if ((point = EC_GROUP_get0_generator(group)) == NULL) goto end; -- 2.20.1