-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting correct dependencies, fixed patches (temporaty disable parall…
…el build)
- Loading branch information
Showing
9 changed files
with
124 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,65 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 93a9e47..75fe5ef 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -542,6 +542,9 @@ IF (OPENSSL_FOUND) | ||
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES}) | ||
ENDIF() | ||
|
||
+IF (USE_CUSTOM_TLS) | ||
+ ADD_DEFINITIONS(-DGIT_CUSTOM_TLS) | ||
+ENDIF() | ||
|
||
|
||
IF (THREADSAFE) | ||
diff --git a/src/settings.c b/src/settings.c | ||
index 00a3ef0..61e0199 100644 | ||
index 00a3ef0..21430bc 100644 | ||
--- a/src/settings.c | ||
+++ b/src/settings.c | ||
@@ -29,7 +29,7 @@ int git_libgit2_features(void) | ||
@@ -29,9 +29,7 @@ int git_libgit2_features(void) | ||
#ifdef GIT_THREADS | ||
| GIT_FEATURE_THREADS | ||
#endif | ||
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) | ||
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CUSTOM_TLS) | ||
| GIT_FEATURE_HTTPS | ||
#endif | ||
-#endif | ||
#if defined(GIT_SSH) | ||
| GIT_FEATURE_SSH | ||
#endif | ||
diff --git a/src/transport.c b/src/transport.c | ||
index 327052f..c4f3254 100644 | ||
index 327052f..32f8464 100644 | ||
--- a/src/transport.c | ||
+++ b/src/transport.c | ||
@@ -29,7 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp | ||
@@ -29,9 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp | ||
static transport_definition transports[] = { | ||
{ "git://", git_transport_smart, &git_subtransport_definition }, | ||
{ "http://", git_transport_smart, &http_subtransport_definition }, | ||
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) | ||
+#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CUSTOM_TLS) | ||
{ "https://", git_transport_smart, &http_subtransport_definition }, | ||
#endif | ||
-#endif | ||
{ "file://", git_transport_local, NULL }, | ||
#ifdef GIT_SSH | ||
{ "ssh://", git_transport_smart, &ssh_subtransport_definition }, | ||
diff --git a/src/transports/http.c b/src/transports/http.c | ||
index 4fbbfbb..9ef05c6 100644 | ||
index 4fbbfbb..30520a0 100644 | ||
--- a/src/transports/http.c | ||
+++ b/src/transports/http.c | ||
@@ -620,7 +620,7 @@ static int http_connect(http_subtransport *t) | ||
@@ -620,7 +620,6 @@ static int http_connect(http_subtransport *t) | ||
|
||
error = git_stream_connect(t->io); | ||
|
||
-#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL) | ||
+#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL) || defined(GIT_CUSTOM_TLS) | ||
if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL && | ||
git_stream_is_encrypted(t->io)) { | ||
git_cert *cert; | ||
@@ -640,7 +639,7 @@ static int http_connect(http_subtransport *t) | ||
return error; | ||
} | ||
} | ||
-#endif | ||
+ | ||
if (error < 0) | ||
return error; | ||
|
||
diff --git a/tests/core/features.c b/tests/core/features.c | ||
index 85cddfe..cf5e190 100644 | ||
--- a/tests/core/features.c | ||
+++ b/tests/core/features.c | ||
@@ -17,11 +17,7 @@ void test_core_features__0(void) | ||
cl_assert((caps & GIT_FEATURE_THREADS) == 0); | ||
#endif | ||
|
||
-#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT) | ||
cl_assert((caps & GIT_FEATURE_HTTPS) != 0); | ||
-#else | ||
- cl_assert((caps & GIT_FEATURE_HTTPS) == 0); | ||
-#endif | ||
|
||
#if defined(GIT_SSH) | ||
cl_assert((caps & GIT_FEATURE_SSH) != 0); |