diff options
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 26 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_local.h | 4 |
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, | |||
| 1390 | int | 1390 | int |
| 1391 | EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx_in) | 1391 | EC_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 | ||
| 1413 | int | 1396 | int |
| 1414 | EC_GROUP_have_precompute_mult(const EC_GROUP *group) | 1397 | EC_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 | ||
| 1422 | int | 1402 | 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 @@ | |||
| 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. |
