Skip to content

Commit 78b500b

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#3850 from wildart/custom-tls
Enable https transport for custom TLS streams
2 parents da7f9fe + bdec62d commit 78b500b

File tree

4 files changed

+1
-10
lines changed

4 files changed

+1
-10
lines changed

src/settings.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ int git_libgit2_features(void)
2929
#ifdef GIT_THREADS
3030
| GIT_FEATURE_THREADS
3131
#endif
32-
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
3332
| GIT_FEATURE_HTTPS
34-
#endif
3533
#if defined(GIT_SSH)
3634
| GIT_FEATURE_SSH
3735
#endif

src/transport.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ static transport_definition local_transport_definition = { "file://", git_transp
2929
static transport_definition transports[] = {
3030
{ "git://", git_transport_smart, &git_subtransport_definition },
3131
{ "http://", git_transport_smart, &http_subtransport_definition },
32-
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
3332
{ "https://", git_transport_smart, &http_subtransport_definition },
34-
#endif
3533
{ "file://", git_transport_local, NULL },
3634
#ifdef GIT_SSH
3735
{ "ssh://", git_transport_smart, &ssh_subtransport_definition },

src/transports/http.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,6 @@ static int http_connect(http_subtransport *t)
620620

621621
error = git_stream_connect(t->io);
622622

623-
#if defined(GIT_OPENSSL) || defined(GIT_SECURE_TRANSPORT) || defined(GIT_CURL)
624623
if ((!error || error == GIT_ECERTIFICATE) && t->owner->certificate_check_cb != NULL &&
625624
git_stream_is_encrypted(t->io)) {
626625
git_cert *cert;
@@ -640,7 +639,7 @@ static int http_connect(http_subtransport *t)
640639
return error;
641640
}
642641
}
643-
#endif
642+
644643
if (error < 0)
645644
return error;
646645

tests/core/features.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ void test_core_features__0(void)
1717
cl_assert((caps & GIT_FEATURE_THREADS) == 0);
1818
#endif
1919

20-
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
2120
cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
22-
#else
23-
cl_assert((caps & GIT_FEATURE_HTTPS) == 0);
24-
#endif
2521

2622
#if defined(GIT_SSH)
2723
cl_assert((caps & GIT_FEATURE_SSH) != 0);

0 commit comments

Comments
 (0)