Skip to content

Commit 5700ee9

Browse files
authored
Merge pull request libgit2#4216 from pks-t/pks/debian-test-failures
Debian HTTPS feature test failure
2 parents f86f35d + 417319c commit 5700ee9

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ ENDIF()
238238

239239
IF (WIN32 AND WINHTTP)
240240
ADD_DEFINITIONS(-DGIT_WINHTTP)
241+
ADD_DEFINITIONS(-DGIT_HTTPS)
241242

242243
# Since MinGW does not come with headers or an import library for winhttp,
243244
# we have to include a private header and generate our own import library
@@ -546,11 +547,13 @@ ENDIF()
546547

547548
IF (SECURITY_FOUND)
548549
ADD_DEFINITIONS(-DGIT_SECURE_TRANSPORT)
550+
ADD_DEFINITIONS(-DGIT_HTTPS)
549551
INCLUDE_DIRECTORIES(${SECURITY_INCLUDE_DIR})
550552
ENDIF ()
551553

552554
IF (OPENSSL_FOUND)
553555
ADD_DEFINITIONS(-DGIT_OPENSSL)
556+
ADD_DEFINITIONS(-DGIT_HTTPS)
554557
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
555558
SET(SSL_LIBRARIES ${OPENSSL_LIBRARIES})
556559
ENDIF()

src/settings.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ int git_libgit2_features(void)
3131
#ifdef GIT_THREADS
3232
| GIT_FEATURE_THREADS
3333
#endif
34-
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
34+
#ifdef GIT_HTTPS
3535
| GIT_FEATURE_HTTPS
3636
#endif
3737
#if defined(GIT_SSH)

tests/core/features.c

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

20+
#ifdef GIT_HTTPS
2021
cl_assert((caps & GIT_FEATURE_HTTPS) != 0);
22+
#endif
2123

2224
#if defined(GIT_SSH)
2325
cl_assert((caps & GIT_FEATURE_SSH) != 0);

tests/online/badssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
static git_repository *g_repo;
66

7-
#if defined(GIT_OPENSSL) || defined(GIT_WINHTTP) || defined(GIT_SECURE_TRANSPORT)
7+
#ifdef GIT_HTTPS
88
static bool g_has_ssl = true;
99
#else
1010
static bool g_has_ssl = false;

0 commit comments

Comments
 (0)