4bd1fbd959
This reverts commit d0a1bafe43
.
59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
From 57f32d20013fe0fc975e8fcc11b0a91c56df5d04 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= <cmn@dwim.me>
|
|
Date: Wed, 2 Nov 2016 13:11:31 +0100
|
|
Subject: [PATCH 4/4] openssl: include OpenSSL headers only when we're buliding
|
|
against it
|
|
|
|
We need to include the initialisation and construction functions in all
|
|
backend, so we include this header when building against SecureTransport
|
|
and WinHTTP as well.
|
|
|
|
(cherry picked from commit 3b832a085b8c5dc304dd803979894b9bae05df6d)
|
|
---
|
|
src/openssl_stream.h | 16 ++++++++++------
|
|
1 file changed, 10 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/openssl_stream.h b/src/openssl_stream.h
|
|
index e8ce5d9..b769437 100644
|
|
--- a/src/openssl_stream.h
|
|
+++ b/src/openssl_stream.h
|
|
@@ -7,11 +7,6 @@
|
|
#ifndef INCLUDE_openssl_stream_h__
|
|
#define INCLUDE_openssl_stream_h__
|
|
|
|
-#include <openssl/ssl.h>
|
|
-#include <openssl/err.h>
|
|
-#include <openssl/x509v3.h>
|
|
-#include <openssl/bio.h>
|
|
-
|
|
#include "git2/sys/stream.h"
|
|
|
|
extern int git_openssl_stream_global_init(void);
|
|
@@ -24,6 +19,14 @@ extern int git_openssl_stream_new(git_stream **out, const char *host, const char
|
|
* we can program against the interface instead of littering the implementation
|
|
* with ifdefs.
|
|
*/
|
|
+#ifdef GIT_OPENSSL
|
|
+# include <openssl/ssl.h>
|
|
+# include <openssl/err.h>
|
|
+# include <openssl/x509v3.h>
|
|
+# include <openssl/bio.h>
|
|
+
|
|
+
|
|
+
|
|
# if OPENSSL_VERSION_NUMBER < 0x10100000L
|
|
|
|
GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
|
|
@@ -113,6 +116,7 @@ GIT_INLINE(const unsigned char *) ASN1_STRING_get0_data(const ASN1_STRING *x)
|
|
return ASN1_STRING_data((ASN1_STRING *)x);
|
|
}
|
|
|
|
-# endif
|
|
+# endif // OpenSSL < 1.1
|
|
+#endif // GIT_OPENSSL
|
|
|
|
#endif
|
|
--
|
|
2.10.1
|
|
|