1. 19 Aug, 2023 1 commit
    • cmake: fix openssl build on win32 · 86872834
      since f15c8ac7 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)
      Christoph Reiter committed
  2. 21 Mar, 2023 2 commits
  3. 23 Mar, 2022 1 commit
  4. 14 Nov, 2021 2 commits
  5. 11 Nov, 2021 1 commit
  6. 24 Aug, 2021 1 commit
    • openssl: dynamically load libssl and symbols (optionally) · 0903cac1
      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.
      Edward Thomson committed
  7. 01 Jun, 2020 1 commit
  8. 01 Apr, 2020 1 commit
  9. 24 Feb, 2020 1 commit
    • cmake: sanitize boolean options passed by user · 41b6d30c
      Starting with our conversions to mix backend-autodetection and selection
      into a single variable (USE_GSSAPI, USE_HTTPS, USE_SHA1), we have
      introduced a simple STREQUAL to check for "ON", which indicates that the
      user wants us to auto-detect available backends and pick any one that's
      available. This behaviour deviates from previous behaviour, as passing a
      value like "yes", "on" or "true" will in fact be treated like a backend
      name and result in autodetection failure.
      
      Fix the issue by introducing a new function `SanitizeBool`. Given a
      variable that may hold a boolean value, the function will sanitize that
      variable to hold either "ON" or "OFF". In case it is not a recognized
      boolean, we will just keep the value as-is. This fixes the above
      described issue.
      Patrick Steinhardt committed
  10. 13 Oct, 2019 1 commit
    • cmake: correct the link stanza for CoreFoundation · a088a1ff
      LIBRARIES is the (absolute?) path to the library.
      LDFLAGS is the full linker stanza to correctly link with this lib.
      
      By passing LIBRARIES as LIBGIT_LIBS, the linker ends up with the
      absolute path for the SDK'ed version of CoreFoundation (which doesn't
      exist), instead of the familiar `-framework CoreFoundation`.
      Etienne Samson committed
  11. 13 Sep, 2019 2 commits
    • cmake: fix various misuses of MESSAGE() · 212b6f65
      The MESSAGE() function expects as first argument the message type, e.g.
      STATUS or FATAL_ERROR. In some places, we were misusing this to either
      not provide any type, which would then erroneously print the message to
      standard error, or to use FATAL instead of FATAL_ERROR.
      
      Fix all of these instances. Also, remove some MESSAGE invocations that
      are obvious leftovers from debugging the build system.
      Patrick Steinhardt committed
    • cmake: properly abort if no mbedTLS cert location is found · e77fdf87
      When using mbedTLS as backend, then the user may specify the location of
      where system certificates are installed. If no such location is provided
      by the user, CMake will try to autodetect the location by using the
      openssl executable, if installed. If no location could be detected, then
      the mbedTLS is essentially worthless as it is completely unable to
      verify any certificates.
      
      To avoid use of such misconfigured mbedTLS configurations, let's error
      out if we were unable to find out the location.
      Patrick Steinhardt committed
  12. 10 Sep, 2019 1 commit
  13. 14 Jun, 2019 1 commit
    • cmake: Modulize our TLS & hash detection · 94fc83b6
      The interactions between `USE_HTTPS` and `SHA1_BACKEND` have been
      streamlined. Previously we would have accepted not quite working
      configurations (like, `-DUSE_HTTPS=OFF -DSHA1_BACKEND=OpenSSL`) and, as
      the OpenSSL detection only ran with `USE_HTTPS`, the link would fail.
      
      The detection was moved to a new `USE_SHA1`, modeled after `USE_HTTPS`,
      which takes the values "CollisionDetection/Backend/Generic", to better
      match how the "hashing backend" is selected, the default (ON) being
      "CollisionDetection".
      
      Note that, as `SHA1_BACKEND` is still used internally, you might need to
      check what customization you're using it for.
      Etienne Samson committed