[openssh-commits] [openssh] 01/01: fix builds on OpenSSL <= 1.0.x
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Oct 26 13:46:04 AEDT 2018
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 406a24b25d6a2bdd70cacd16de7e899dcb2a8829
Author: Damien Miller <djm at mindrot.org>
Date: Fri Oct 26 13:43:28 2018 +1100
fix builds on OpenSSL <= 1.0.x
I thought OpenSSL 1.0.x offered the new-style OpenSSL_version_num() API
to obtain version number, but they don't.
---
configure.ac | 9 ++++++++-
openbsd-compat/openssl-compat.h | 6 ++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0d55bece..a4109eff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2601,7 +2601,11 @@ if test "x$openssl" = "xyes" ; then
fd = fopen(DATA,"w");
if(fd == NULL)
exit(1);
-
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+# define OpenSSL_version_num SSLeay
+# define OpenSSL_version SSLeay_version
+# define OPENSSL_VERSION SSLEAY_VERSION
+#endif
if ((rc = fprintf(fd, "%08lx (%s)\n",
(unsigned long)OpenSSL_version_num(),
OpenSSL_version(OPENSSL_VERSION))) < 0)
@@ -2646,6 +2650,9 @@ if test "x$openssl" = "xyes" ; then
#include <openssl/opensslv.h>
#include <openssl/crypto.h>
]], [[
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+# define OpenSSL_version_num SSLeay
+#endif
exit(OpenSSL_version_num() == OPENSSL_VERSION_NUMBER ? 0 : 1);
]])],
[
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 9e0264c0..0fbf60df 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -33,6 +33,12 @@ int ssh_compatible_openssl(long, long);
# error OpenSSL 0.9.8f or greater is required
#endif
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+# define OpenSSL_version_num SSLeay
+# define OpenSSL_version SSLeay_version
+# define OPENSSL_VERSION SSLEAY_VERSION
+#endif
+
#if OPENSSL_VERSION_NUMBER < 0x10000001L
# define LIBCRYPTO_EVP_INL_TYPE unsigned int
#else
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list