summaryrefslogtreecommitdiff
path: root/usr.bin/openssl
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-05-10 20:58:33 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-05-10 20:58:33 +0000
commit93219ce1f6e91b01c4f88edcf0a328c4d748d19f (patch)
tree9d8e7f7a3e6e0b91ef9b4d18fd62c40ff2577370 /usr.bin/openssl
parentfc684cf5e63d656062ac247ed88adb5fc6098967 (diff)
Replace unnecessary calls to EC_GROUP_get_curve_GF{p,2m}() with
EC_GROUP_get_curve() and remove no longer needed prototypes.
Diffstat (limited to 'usr.bin/openssl')
-rw-r--r--usr.bin/openssl/ecparam.c18
1 files 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 <openssl/pem.h>
#include <openssl/x509.h>
-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;