[openssh-commits] [openssh] 05/05: Add compat shims for EC_POINT affine_coordinates
git+noreply at mindrot.org
git+noreply at mindrot.org
Tue May 20 18:16:58 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 1a9b1cfa4e8b807c7f82fdba8f730c2abdbba071
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Tue May 20 18:14:06 2025 +1000
Add compat shims for EC_POINT affine_coordinates
LibreSSL <3.4 does not have EC_POINT_[gs]et_affine_coordinates
but does have the now-deprecated _GFp variantes. We still support
LibreSSL back as far as 3.2.x so add a compat shim.
---
configure.ac | 4 ++++
openbsd-compat/openssl-compat.h | 14 ++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/configure.ac b/configure.ac
index 98d98594b..94e782e15 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3107,6 +3107,10 @@ if test "x$openssl" = "xyes" ; then
# LibreSSL/OpenSSL API differences
AC_CHECK_FUNCS([ \
+ EC_POINT_get_affine_coordinates \
+ EC_POINT_get_affine_coordinates_GFp \
+ EC_POINT_set_affine_coordinates \
+ EC_POINT_set_affine_coordinates_GFp \
EVP_CIPHER_CTX_iv \
EVP_CIPHER_CTX_iv_noconst \
EVP_CIPHER_CTX_get_iv \
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 936f4068d..4539d8d50 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -60,6 +60,20 @@ void ssh_libcrypto_init(void);
# define BN_set_flags(a, b)
#endif
+/* LibreSSL <3.4 has the _GFp variants but not the equivalent modern ones. */
+#ifndef HAVE_EC_POINT_GET_AFFINE_COORDINATES
+# ifdef HAVE_EC_POINT_GET_AFFINE_COORDINATES_GFP
+# define EC_POINT_get_affine_coordinates(a, b, c, d, e) \
+ (EC_POINT_get_affine_coordinates_GFp(a, b, c, d, e))
+# endif
+#endif
+#ifndef HAVE_EC_POINT_SET_AFFINE_COORDINATES
+# ifdef HAVE_EC_POINT_SET_AFFINE_COORDINATES_GFP
+# define EC_POINT_set_affine_coordinates(a, b, c, d, e) \
+ (EC_POINT_set_affine_coordinates_GFp(a, b, c, d, e))
+# endif
+#endif
+
#ifndef HAVE_EVP_CIPHER_CTX_GET_IV
# ifdef HAVE_EVP_CIPHER_CTX_GET_UPDATED_IV
# define EVP_CIPHER_CTX_get_iv EVP_CIPHER_CTX_get_updated_iv
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list