summaryrefslogtreecommitdiff
path: root/openbsd-compat/openssl-compat.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2018-10-26 13:43:28 +1100
committerDamien Miller <djm@mindrot.org>2018-10-26 13:43:28 +1100
commit406a24b25d6a2bdd70cacd16de7e899dcb2a8829 (patch)
tree28390a7c41589960400dc9beb41aa77ad3e8db7a /openbsd-compat/openssl-compat.h
parent859754bdeb41373d372e36b5dc89c547453addb3 (diff)
downloadopenssh-git-406a24b25d6a2bdd70cacd16de7e899dcb2a8829.tar.gz
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 'openbsd-compat/openssl-compat.h')
-rw-r--r--openbsd-compat/openssl-compat.h6
1 files changed, 6 insertions, 0 deletions
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