diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lib.c')
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index f97144ea91..3c5a7d5c34 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.100 2025/01/06 14:25:10 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.101 2025/01/06 14:29:33 tb 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 | */ |
@@ -404,7 +404,7 @@ EC_GROUP_get0_order(const EC_GROUP *group) | |||
404 | int | 404 | int |
405 | EC_GROUP_order_bits(const EC_GROUP *group) | 405 | EC_GROUP_order_bits(const EC_GROUP *group) |
406 | { | 406 | { |
407 | return group->meth->group_order_bits(group); | 407 | return BN_num_bits(group->order); |
408 | } | 408 | } |
409 | LCRYPTO_ALIAS(EC_GROUP_order_bits); | 409 | LCRYPTO_ALIAS(EC_GROUP_order_bits); |
410 | 410 | ||
@@ -592,11 +592,7 @@ LCRYPTO_ALIAS(EC_GROUP_new_curve_GFp); | |||
592 | int | 592 | int |
593 | EC_GROUP_get_degree(const EC_GROUP *group) | 593 | EC_GROUP_get_degree(const EC_GROUP *group) |
594 | { | 594 | { |
595 | if (group->meth->group_get_degree == NULL) { | 595 | return BN_num_bits(group->p); |
596 | ECerror(ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | ||
597 | return 0; | ||
598 | } | ||
599 | return group->meth->group_get_degree(group); | ||
600 | } | 596 | } |
601 | LCRYPTO_ALIAS(EC_GROUP_get_degree); | 597 | LCRYPTO_ALIAS(EC_GROUP_get_degree); |
602 | 598 | ||
@@ -1385,9 +1381,3 @@ EC_GROUP_have_precompute_mult(const EC_GROUP *group) | |||
1385 | return 0; | 1381 | return 0; |
1386 | } | 1382 | } |
1387 | LCRYPTO_ALIAS(EC_GROUP_have_precompute_mult); | 1383 | LCRYPTO_ALIAS(EC_GROUP_have_precompute_mult); |
1388 | |||
1389 | int | ||
1390 | ec_group_simple_order_bits(const EC_GROUP *group) | ||
1391 | { | ||
1392 | return BN_num_bits(group->order); | ||
1393 | } | ||