diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2023-06-24 18:21:08 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2023-06-24 18:21:08 +0000 |
commit | 08a3840f58dc4a05fd64e16e8ced78e6a67e2d16 (patch) | |
tree | fef09453bb4c4309255ee9a5328c3c2f9d4e002e /lib/libcrypto/ec | |
parent | 6ab8500e66c1daa5a60d8b15a707a46ebe1f8972 (diff) |
Remove precompute_mult/have_precompute_mult from EC_METHOD.
These are no longer in use - stub EC_GROUP_precompute_mult() and
EC_GROUP_have_precompute_mult() to match their existing behaviour.
ok tb@
Diffstat (limited to 'lib/libcrypto/ec')
-rw-r--r-- | lib/libcrypto/ec/ec_lib.c | 26 | ||||
-rw-r--r-- | lib/libcrypto/ec/ec_local.h | 4 |
2 files changed, 4 insertions, 26 deletions
diff --git a/lib/libcrypto/ec/ec_lib.c b/lib/libcrypto/ec/ec_lib.c index 93a90651290..cb581f6e1c1 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.59 2023/06/24 17:49:44 jsing Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.60 2023/06/24 18:21:07 jsing Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -1390,33 +1390,13 @@ EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in) { - BN_CTX *ctx; - int ret = 0; - - if (group->meth->precompute_mult == NULL) - return 1; - - if ((ctx = ctx_in) == NULL) - ctx = BN_CTX_new(); - if (ctx == NULL) - goto err; - - ret = group->meth->precompute_mult(group, ctx); - - err: - if (ctx != ctx_in) - BN_CTX_free(ctx); - - return ret; + return 1; } int EC_GROUP_have_precompute_mult(const EC_GROUP *group) { - if (group->meth->have_precompute_mult == NULL) - return 0; - - return group->meth->have_precompute_mult(group); + return 0; } int diff --git a/lib/libcrypto/ec/ec_local.h b/lib/libcrypto/ec/ec_local.h index c0689a3c3e6..caa73bc7288 100644 --- a/lib/libcrypto/ec/ec_local.h +++ b/lib/libcrypto/ec/ec_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_local.h,v 1.16 2023/06/24 17:49:44 jsing Exp $ */ +/* $OpenBSD: ec_local.h,v 1.17 2023/06/24 18:21:07 jsing Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -145,8 +145,6 @@ struct ec_method_st { int (*mul_double_nonct)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, const BIGNUM *p_scalar, const EC_POINT *point, BN_CTX *); - int (*precompute_mult)(EC_GROUP *group, BN_CTX *); - int (*have_precompute_mult)(const EC_GROUP *group); /* * Internal methods. |