aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorBernard Spil <Sp1l@users.noreply.github.com>2016-09-19 21:11:45 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-09-19 22:47:35 +0200
commit01c8db47aa020d426c196f5f4968f710396dc164 (patch)
treea14b9cf08c205daebac24fabd0226f8895a06294 /lib/vtls
parent31dd3bf674ff7e627700bcb2c65e2e501ffe1037 (diff)
libressl: fix version output
LibreSSL defines `OPENSSL_VERSION_NUMBER` as `0x20000000L` for all versions returning `LibreSSL/2.0.0` for any LibreSSL version. This change provides a local OpenSSL_version_num function replacement returning LIBRESSL_VERSION_NUMBER instead. Closes #1029
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/openssl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index dd6f1c99c..ddfc66da5 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -119,8 +119,15 @@
#define X509_get0_notAfter(x) X509_get_notAfter(x)
#define CONST_EXTS /* nope */
#define CONST_ASN1_BIT_STRING /* nope */
+#ifdef LIBRESSL_VERSION_NUMBER
+static unsigned long OpenSSL_version_num(void)
+{
+ return LIBRESSL_VERSION_NUMBER;
+}
+#else
#define OpenSSL_version_num() SSLeay()
#endif
+#endif
#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) && /* 1.0.2 or later */ \
!defined(LIBRESSL_VERSION_NUMBER)