summaryrefslogtreecommitdiff
path: root/content/fetchers
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-11-21 18:29:23 +0000
committerVincent Sanders <vince@kyllikki.org>2016-11-21 18:29:23 +0000
commit3f88c12315556d6f5f928c7e6a5e56357899ece7 (patch)
treeece2516e7e245bd83655d49b21b8a510c003506c /content/fetchers
parent356e92c604ec6ab218302cfc1704f04ae171ddeb (diff)
downloadnetsurf-3f88c12315556d6f5f928c7e6a5e56357899ece7.tar.gz
netsurf-3f88c12315556d6f5f928c7e6a5e56357899ece7.tar.bz2
Fix OpenSSL X509 cert API detection
LibreSSL defines a OPENSSL_VERSION_NUMBER of 2.1 but only provides the old OpenSSL 1.0.x API.
Diffstat (limited to 'content/fetchers')
-rw-r--r--content/fetchers/curl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 7ddf5121d..7d0e40c24 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -128,8 +128,10 @@ static char fetch_error_buffer[CURL_ERROR_SIZE];
static char fetch_proxy_userpwd[100];
-/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed */
-#if (OPENSSL_VERSION_NUMBER < 0x1010000fL)
+/* OpenSSL 1.0.x to 1.1.0 certificate reference counting changed
+ * LibreSSL declares its OpenSSL version as 2.1 but only supports the old way
+ */
+#if (defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER < 0x1010000fL))
static int ns_X509_up_ref(X509 *cert)
{
cert->references++;