Skip to content

Commit a4de1ae

Browse files
committed
cmake: define GIT_HTTPS when HTTPS is supported
1 parent 0d2f682 commit a4de1ae

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-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/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)