[openssh-commits] [openssh] 01/01: Check for the existence of openssl version funcs.
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat Oct 27 16:47:10 AEDT 2018
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 262d81a259d4aa1507c709ec9d5caa21c7740722
Author: Darren Tucker <dtucker at dtucker.net>
Date: Sat Oct 27 16:45:59 2018 +1100
Check for the existence of openssl version funcs.
Check for the existence of openssl version functions and use the ones
detected instead of trying to guess based on the int32 version
identifier. Fixes builds with LibreSSL.
---
configure.ac | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index a4109eff..10696513 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2585,6 +2585,9 @@ if test "x$openssl" = "xyes" ; then
]
)
+ # Determining OpenSSL library version is version dependent.
+ AC_CHECK_FUNCS([OpenSSL_version OpenSSL_version_num])
+
# Determine OpenSSL library version
AC_MSG_CHECKING([OpenSSL library version])
AC_RUN_IFELSE(
@@ -2601,10 +2604,14 @@ 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
+#ifndef OPENSSL_VERSION
+# define OPENSSL_VERSION SSLEAY_VERSION
+#endif
+#ifndef HAVE_OPENSSL_VERSION
# define OpenSSL_version SSLeay_version
-# define OPENSSL_VERSION SSLEAY_VERSION
+#endif
+#ifndef HAVE_OPENSSL_VERSION_NUM
+# define OpenSSL_version_num SSLeay
#endif
if ((rc = fprintf(fd, "%08lx (%s)\n",
(unsigned long)OpenSSL_version_num(),
@@ -2650,8 +2657,8 @@ if test "x$openssl" = "xyes" ; then
#include <openssl/opensslv.h>
#include <openssl/crypto.h>
]], [[
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
-# define OpenSSL_version_num SSLeay
+#ifndef HAVE_OPENSSL_VERSION_NUM
+# define OpenSSL_version_num SSLeay
#endif
exit(OpenSSL_version_num() == OPENSSL_VERSION_NUMBER ? 0 : 1);
]])],
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list