summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-10-15 06:27:43 +0000
committertb <>2024-10-15 06:27:43 +0000
commit37ceb9894fccc17c8d4f05088795a1885355e209 (patch)
treea2645d67acbe0623e9e5c5c40b908c48032e168e /src
parentbee8e9204cf4b2cb0c53c4431da6ab1d54393c6d (diff)
downloadopenbsd-37ceb9894fccc17c8d4f05088795a1885355e209.tar.gz
openbsd-37ceb9894fccc17c8d4f05088795a1885355e209.tar.bz2
openbsd-37ceb9894fccc17c8d4f05088795a1885355e209.zip
Provide EC_GROUP_get0_cofactor() for internal use
While this is public API in OpenSSL, there are no plans to expose it. ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c8
-rw-r--r--src/lib/libcrypto/ec/ec_local.h3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c
index 85567a76c1..4b7eb6016c 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.67 2024/04/23 10:52:08 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.68 2024/10/15 06:27:43 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 */
@@ -393,6 +393,12 @@ EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx)
393} 393}
394LCRYPTO_ALIAS(EC_GROUP_get_cofactor); 394LCRYPTO_ALIAS(EC_GROUP_get_cofactor);
395 395
396const BIGNUM *
397EC_GROUP_get0_cofactor(const EC_GROUP *group)
398{
399 return &group->cofactor;
400}
401
396void 402void
397EC_GROUP_set_curve_name(EC_GROUP *group, int nid) 403EC_GROUP_set_curve_name(EC_GROUP *group, int nid)
398{ 404{
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h
index c2befdede7..ca55770ba8 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.28 2024/10/03 06:24:07 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.29 2024/10/15 06:27:43 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 */
@@ -356,6 +356,7 @@ int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
356 const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); 356 const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
357 357
358/* Public API in OpenSSL */ 358/* Public API in OpenSSL */
359const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group);
359const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); 360const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);
360 361
361__END_HIDDEN_DECLS 362__END_HIDDEN_DECLS