summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2023-06-24 18:21:07 +0000
committerjsing <>2023-06-24 18:21:07 +0000
commitd29bac6c554e792eda441d648c01f53ebcebfc9c (patch)
treeb031a7ba16417b9b5e9eee83d98dee0b8140435e /src
parent7f15e5a3e5c10e4517df9decdb2e27dcf9550d6c (diff)
downloadopenbsd-d29bac6c554e792eda441d648c01f53ebcebfc9c.tar.gz
openbsd-d29bac6c554e792eda441d648c01f53ebcebfc9c.tar.bz2
openbsd-d29bac6c554e792eda441d648c01f53ebcebfc9c.zip
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 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c26
-rw-r--r--src/lib/libcrypto/ec/ec_local.h4
2 files changed, 4 insertions, 26 deletions
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 @@
1/* $OpenBSD: ec_lib.c,v 1.59 2023/06/24 17:49:44 jsing Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.60 2023/06/24 18:21:07 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -1390,33 +1390,13 @@ EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar,
1390int 1390int
1391EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in) 1391EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in)
1392{ 1392{
1393 BN_CTX *ctx; 1393 return 1;
1394 int ret = 0;
1395
1396 if (group->meth->precompute_mult == NULL)
1397 return 1;
1398
1399 if ((ctx = ctx_in) == NULL)
1400 ctx = BN_CTX_new();
1401 if (ctx == NULL)
1402 goto err;
1403
1404 ret = group->meth->precompute_mult(group, ctx);
1405
1406 err:
1407 if (ctx != ctx_in)
1408 BN_CTX_free(ctx);
1409
1410 return ret;
1411} 1394}
1412 1395
1413int 1396int
1414EC_GROUP_have_precompute_mult(const EC_GROUP *group) 1397EC_GROUP_have_precompute_mult(const EC_GROUP *group)
1415{ 1398{
1416 if (group->meth->have_precompute_mult == NULL) 1399 return 0;
1417 return 0;
1418
1419 return group->meth->have_precompute_mult(group);
1420} 1400}
1421 1401
1422int 1402int
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 @@
1/* $OpenBSD: ec_local.h,v 1.16 2023/06/24 17:49:44 jsing Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.17 2023/06/24 18:21:07 jsing Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -145,8 +145,6 @@ struct ec_method_st {
145 int (*mul_double_nonct)(const EC_GROUP *group, EC_POINT *r, 145 int (*mul_double_nonct)(const EC_GROUP *group, EC_POINT *r,
146 const BIGNUM *g_scalar, const BIGNUM *p_scalar, 146 const BIGNUM *g_scalar, const BIGNUM *p_scalar,
147 const EC_POINT *point, BN_CTX *); 147 const EC_POINT *point, BN_CTX *);
148 int (*precompute_mult)(EC_GROUP *group, BN_CTX *);
149 int (*have_precompute_mult)(const EC_GROUP *group);
150 148
151 /* 149 /*
152 * Internal methods. 150 * Internal methods.