summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-09-13 14:09:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-09-14 11:57:20 +0200
commit4ff5f9405abff825df8c1da0e432081f1877f717 (patch)
treed087819be23a7b09464cf32aeea25c0ac5580bb0
parent1599dfcba6594adb876cbe653c6b450cbbde0d2c (diff)
downloadcurl-4ff5f9405abff825df8c1da0e432081f1877f717.tar.gz
openssl: show "proper" version number for libressl builds
Closes #2989
-rw-r--r--lib/vtls/openssl.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 841239396..083e63471 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -129,16 +129,15 @@
#define X509_get0_notBefore(x) X509_get_notBefore(x)
#define X509_get0_notAfter(x) X509_get_notAfter(x)
#define CONST_EXTS /* nope */
-#ifdef LIBRESSL_VERSION_NUMBER
-static unsigned long OpenSSL_version_num(void)
-{
- return LIBRESSL_VERSION_NUMBER;
-}
-#else
+#ifndef LIBRESSL_VERSION_NUMBER
#define OpenSSL_version_num() SSLeay()
#endif
#endif
+#ifdef LIBRESSL_VERSION_NUMBER
+#define OpenSSL_version_num() LIBRESSL_VERSION_NUMBER
+#endif
+
#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
!(defined(LIBRESSL_VERSION_NUMBER) && \
LIBRESSL_VERSION_NUMBER < 0x20700000L)