diff options
author | tb <> | 2023-07-03 07:26:40 +0000 |
---|---|---|
committer | tb <> | 2023-07-03 07:26:40 +0000 |
commit | 7ff067a06a4219e0119ba4cfcadd91922b9696f7 (patch) | |
tree | ac34ce498be86f132bbd893725023c64f6fb490f /src | |
parent | 659aa2178d089822ccf693dbe92409198a5e6eba (diff) | |
download | openbsd-7ff067a06a4219e0119ba4cfcadd91922b9696f7.tar.gz openbsd-7ff067a06a4219e0119ba4cfcadd91922b9696f7.tar.bz2 openbsd-7ff067a06a4219e0119ba4cfcadd91922b9696f7.zip |
Provide internal-only EC_GROUP_get0_order()
ok jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ec/ec_lib.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/ec/ec_local.h | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 2e180e9661..8cea0bb95b 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.61 2023/06/25 18:52:27 tb Exp $ */ | 1 | /* $OpenBSD: ec_lib.c,v 1.62 2023/07/03 07:26:40 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 | */ |
@@ -357,7 +357,6 @@ EC_GROUP_get0_generator(const EC_GROUP *group) | |||
357 | return group->generator; | 357 | return group->generator; |
358 | } | 358 | } |
359 | 359 | ||
360 | |||
361 | int | 360 | int |
362 | EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) | 361 | EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) |
363 | { | 362 | { |
@@ -367,6 +366,12 @@ EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) | |||
367 | return !BN_is_zero(order); | 366 | return !BN_is_zero(order); |
368 | } | 367 | } |
369 | 368 | ||
369 | const BIGNUM * | ||
370 | EC_GROUP_get0_order(const EC_GROUP *group) | ||
371 | { | ||
372 | return &group->order; | ||
373 | } | ||
374 | |||
370 | int | 375 | int |
371 | EC_GROUP_order_bits(const EC_GROUP *group) | 376 | EC_GROUP_order_bits(const EC_GROUP *group) |
372 | { | 377 | { |
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index a058878a69..0d219e8e21 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.22 2023/06/27 07:31:18 tb Exp $ */ | 1 | /* $OpenBSD: ec_local.h,v 1.23 2023/07/03 07:26:40 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 | */ |
@@ -360,4 +360,7 @@ int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p, | |||
360 | int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group, | 360 | int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group, |
361 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); | 361 | const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); |
362 | 362 | ||
363 | /* Public API in OpenSSL */ | ||
364 | const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); | ||
365 | |||
363 | __END_HIDDEN_DECLS | 366 | __END_HIDDEN_DECLS |