diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
| -rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 26 |
1 files changed, 3 insertions, 23 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 |
