summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-10-26 04:43:28 +0200
committerDamien Miller <djm@mindrot.org>2018-10-26 04:43:28 +0200
commit406a24b25d6a2bdd70cacd16de7e899dcb2a8829 (patch)
tree28390a7c41589960400dc9beb41aa77ad3e8db7a /configure.ac
parentremove remaining references to SSLeay (diff)
downloadopenssh-406a24b25d6a2bdd70cacd16de7e899dcb2a8829.tar.xz
openssh-406a24b25d6a2bdd70cacd16de7e899dcb2a8829.zip
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0d55bece5..a4109effc 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);
]])],
[