From d29bac6c554e792eda441d648c01f53ebcebfc9c Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 24 Jun 2023 18:21:07 +0000 Subject: 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@ --- src/lib/libcrypto/ec/ec_lib.c | 26 +++----------------------- src/lib/libcrypto/ec/ec_local.h | 4 +--- 2 files changed, 4 insertions(+), 26 deletions(-) (limited to 'src/lib/libcrypto') diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 93a9065129..cb581f6e1c 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/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/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index c0689a3c3e..caa73bc728 100644 --- a/src/lib/libcrypto/ec/ec_local.h +++ b/src/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. -- cgit v1.2.3-55-g6feb