summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_local.h
diff options
context:
space:
mode:
authortb <>2024-10-30 06:10:35 +0000
committertb <>2024-10-30 06:10:35 +0000
commitc200e5f13afe3d84e11b9e70000121dafc8040d6 (patch)
treedfc67ef0691385235bc90ed6c5e22dbec04ba68e /src/lib/libcrypto/ec/ec_local.h
parent16ff4ccc2611ac3387e5353ab9ca88ecb4a47734 (diff)
downloadopenbsd-c200e5f13afe3d84e11b9e70000121dafc8040d6.tar.gz
openbsd-c200e5f13afe3d84e11b9e70000121dafc8040d6.tar.bz2
openbsd-c200e5f13afe3d84e11b9e70000121dafc8040d6.zip
Add a convenience wrapper for EC_POINT_point2oct()
EC_POING_point2oct() is annoying to use since its invocation involves two calls: one to determine the space to allocate and one to pass the buffer and perform the actual conversion. Wrap this dance in a helper with the correct signature. ok jsing
Diffstat (limited to 'src/lib/libcrypto/ec/ec_local.h')
-rw-r--r--src/lib/libcrypto/ec/ec_local.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h
index 1a49067cd8..7aa1c3f64e 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.32 2024/10/28 18:01:26 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.33 2024/10/30 06:10:35 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 */
@@ -359,6 +359,12 @@ int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
359int ec_group_is_builtin_curve(const EC_GROUP *group); 359int ec_group_is_builtin_curve(const EC_GROUP *group);
360int ec_group_get_field_type(const EC_GROUP *group); 360int ec_group_get_field_type(const EC_GROUP *group);
361 361
362/*
363 * Wrapper around the unergonomic EC_POINT_point2oct().
364 */
365int ec_point_to_octets(const EC_GROUP *group, const EC_POINT *point, int form,
366 unsigned char **out_buf, size_t *len, BN_CTX *ctx_in);
367
362/* Public API in OpenSSL */ 368/* Public API in OpenSSL */
363const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group); 369const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group);
364const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group); 370const BIGNUM *EC_GROUP_get0_order(const EC_GROUP *group);