From af2131b3d3df2c0644880be5750f567d3ef59b75 Mon Sep 17 00:00:00 2001
From: tb <>
Date: Mon, 10 May 2021 16:58:19 +0000
Subject: Expose EC_POINT_{get,set}_affine_coordinates(3) and
 EC_POINT_set_compressed_coordinates(3)

ok jsing
---
 src/lib/libcrypto/Symbols.list |  3 +++
 src/lib/libcrypto/ec/ec.h      | 15 ++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index c5023001ef..c8834c5a1c 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -1130,6 +1130,7 @@ EC_POINT_dbl
 EC_POINT_dup
 EC_POINT_free
 EC_POINT_get_Jprojective_coordinates_GFp
+EC_POINT_get_affine_coordinates
 EC_POINT_get_affine_coordinates_GF2m
 EC_POINT_get_affine_coordinates_GFp
 EC_POINT_hex2point
@@ -1145,8 +1146,10 @@ EC_POINT_point2bn
 EC_POINT_point2hex
 EC_POINT_point2oct
 EC_POINT_set_Jprojective_coordinates_GFp
+EC_POINT_set_affine_coordinates
 EC_POINT_set_affine_coordinates_GF2m
 EC_POINT_set_affine_coordinates_GFp
+EC_POINT_set_compressed_coordinates
 EC_POINT_set_compressed_coordinates_GF2m
 EC_POINT_set_compressed_coordinates_GFp
 EC_POINT_set_to_infinity
diff --git a/src/lib/libcrypto/ec/ec.h b/src/lib/libcrypto/ec/ec.h
index e8b00c8e23..61b70897f9 100644
--- a/src/lib/libcrypto/ec/ec.h
+++ b/src/lib/libcrypto/ec/ec.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec.h,v 1.23 2021/05/10 16:55:19 tb Exp $ */
+/* $OpenBSD: ec.h,v 1.24 2021/05/10 16:58:19 tb Exp $ */
 /*
  * Originally written by Bodo Moeller for the OpenSSL project.
  */
@@ -453,12 +453,6 @@ const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
  */
 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
 
-#if defined(LIBRESSL_INTERNAL)
-
-int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p,
-    const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
-int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
-    const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
 int EC_POINT_set_affine_coordinates(const EC_GROUP *group, EC_POINT *p,
     const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
 int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
@@ -466,6 +460,13 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
 int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
     const BIGNUM *x, int y_bit, BN_CTX *ctx);
 
+#if defined(LIBRESSL_INTERNAL)
+
+int EC_POINT_set_Jprojective_coordinates(const EC_GROUP *group, EC_POINT *p,
+    const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
+int EC_POINT_get_Jprojective_coordinates(const EC_GROUP *group,
+    const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
+
 #else
 
 /** Sets the jacobian projective coordinates of a EC_POINT over GFp
-- 
cgit v1.2.3-55-g6feb