Commit Graph

16 Commits

Author SHA1 Message Date
Edward Thomson
4546929e00 cmake: case insensitive options
It's hard to remember whether it's `-DUSE_HTTPS=mbedTLS` or
`-DUSE_HTTPS=mbedtls`. Even worse for things like `builtin` which we may
have been inconsistent about. Allow for case insensitive options.
2025-01-02 12:36:46 +00:00
Edward Thomson
c4c284e46f cmake: standardize HTTPS backend definitions
There were a few oddities around HTTPS provider selection: namely,
`GIT_OPENSSL_DYNAMIC` implied `GIT_OPENSSL`, which made a bit of sense,
until we added FIPS support. In addition, dynamic OpenSSL for _hashes_
and dynamic OpenSSL for HTTPS was conflated in a few places.

Untangle these, and make `GIT_HTTPS_*` the define, for consistency with
other feature provider selection.
2025-01-02 12:36:11 +00:00
Edward Thomson
d1d65787b4 cmake: enforce USE_HTTPS validity 2024-10-22 11:45:58 +01:00
Kyle
4b63eb5dc8 Fix iOS build issue 2024-09-05 00:07:30 +08:00
Edward Thomson
e696528aa8 Update cmake/SelectHTTPSBackend.cmake 2024-02-17 14:27:19 +00:00
Christopher Fujino
8dd5d60e80 guard 2023-09-09 20:50:42 -07:00
Christopher Fujino
40556c798a add dl to LIBGIT2_SYSTEM_LIBS 2023-09-09 20:06:12 -07:00
Christoph Reiter
86872834c5 cmake: fix openssl build on win32
since f15c8ac71a libgit unconditionally depends on secur32 on Windows
but only added it in cmake for the winhttp and schannel variants.
In case libgit is built against openssl it would fail to link.

This moves secur32 out of the https backend selection code into
the global win32 condition (and while at it also adds ws2_32 to the .pc file)
2023-08-19 10:44:25 +02:00
Edward Thomson
f15c8ac71a http: add SSPI authentication on Windows
Add support for SSPI on Windows, which offers NTLM and Negotiate
authentication.
2023-03-21 09:15:14 +00:00
Edward Thomson
f68f542eb6 http: introduce schannel streams for windows
Provide a stream interface for Schannel - the native crypto APIs - on
Windows. This allows Windows to use the same HTTP transport that all the
other platforms use, with its own native crypto.

Ultimately this allows us to deprecate WinHTTP and we need not add
support for our socket changes in two places (our HTTP stack and the
WinHTTP stack).
2023-03-21 09:09:48 +00:00
Edward Thomson
b3e3fa10ea sha: support mbedTLS for SHA256 2022-03-23 08:39:19 -04:00
Edward Thomson
395b3dc403 cmake: refactor global variables
Update the global variables `LIBGIT2_OBJECTS` to
`LIBGIT2_DEPENDENCY_OBJECTS` for clarity and consistency.
2021-11-14 07:25:41 -05:00
Edward Thomson
c3fec45645 cmake: reformat modules
Apply the standard project cmake formatting to the modules.
2021-11-14 07:25:41 -05:00
Edward Thomson
789ab91560 cmake: standardize USE_WINHTTP
WinHTTP can now be disabled with `USE_WINHTTP=OFF` instead of
`WINHTTP=OFF` to better support the other cmake semantics.
2021-11-11 15:56:10 -05:00
Edward Thomson
0903cac1d0 openssl: dynamically load libssl and symbols (optionally)
Provide an interface around OpenSSL to dynamically load the libraries
and symbols, so that users can distribute a libgit2 library that is not
linked directly against OpenSSL.  This enables users to target multiple
distributions with a single binary.

This mechanism is optional and disabled by default.  Configure cmake
with -DUSE_HTTPS=OpenSSL-Dynamic to use it.
2021-08-24 14:09:10 -04:00
Patrick Steinhardt
bc02bcd920 cmake: move modules into the "cmake/" top level dir
Our custom CMake module currently live in "cmake/Modules". As the
"cmake/" directory doesn't contain anything except the "Modules"
directory, it doesn't really make sense to have the additional
intermediate directory. So let's instead move the modules one level up
into the "cmake/" top level directory.
2020-06-01 14:06:20 +02:00