summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-05-10 20:58:32 +0000
committertb <>2021-05-10 20:58:32 +0000
commit0e355d723580b07c1b33e79a9d5509ec28f527ed (patch)
tree74273cbd2e4aff8e991272939189e84f789f45a4 /src
parentb973e0b6acc51d52707c55a3702e5761ddb84311 (diff)
downloadopenbsd-0e355d723580b07c1b33e79a9d5509ec28f527ed.tar.gz
openbsd-0e355d723580b07c1b33e79a9d5509ec28f527ed.tar.bz2
openbsd-0e355d723580b07c1b33e79a9d5509ec28f527ed.zip
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 'src')
-rw-r--r--src/usr.bin/openssl/ecparam.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/src/usr.bin/openssl/ecparam.c b/src/usr.bin/openssl/ecparam.c
index 611eef314d..01974a7f46 100644
--- a/src/usr.bin/openssl/ecparam.c
+++ b/src/usr.bin/openssl/ecparam.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecparam.c,v 1.20 2021/04/21 00:31:59 tb Exp $ */ 1/* $OpenBSD: ecparam.c,v 1.21 2021/05/10 20:58:32 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project. 3 * Written by Nils Larsch for the OpenSSL project.
4 */ 4 */
@@ -87,11 +87,6 @@
87#include <openssl/pem.h> 87#include <openssl/pem.h>
88#include <openssl/x509.h> 88#include <openssl/x509.h>
89 89
90int EC_GROUP_get_curve_GF2m(const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *,
91 BN_CTX *);
92int EC_GROUP_get_curve_GFp(const EC_GROUP *, BIGNUM *, BIGNUM *, BIGNUM *,
93 BN_CTX *);
94
95static int ecparam_print_var(BIO *, BIGNUM *, const char *, int, 90static int ecparam_print_var(BIO *, BIGNUM *, const char *, int,
96 unsigned char *); 91 unsigned char *);
97 92
@@ -426,15 +421,8 @@ ecparam_main(int argc, char **argv)
426 is_prime = (EC_METHOD_get_field_type(meth) == 421 is_prime = (EC_METHOD_get_field_type(meth) ==
427 NID_X9_62_prime_field); 422 NID_X9_62_prime_field);
428 423
429 if (is_prime) { 424 if (!EC_GROUP_get_curve(group, ec_p, ec_a, ec_b, NULL))
430 if (!EC_GROUP_get_curve_GFp(group, ec_p, ec_a, 425 goto end;
431 ec_b, NULL))
432 goto end;
433 } else {
434 if (!EC_GROUP_get_curve_GF2m(group, ec_p, ec_a,
435 ec_b, NULL))
436 goto end;
437 }
438 426
439 if ((point = EC_GROUP_get0_generator(group)) == NULL) 427 if ((point = EC_GROUP_get0_generator(group)) == NULL)
440 goto end; 428 goto end;