mirror of
https://github.com/libssh2/libssh2.git
synced 2025-07-31 00:03:08 +03:00
build: make HAVE_LIBCRYPT32
local to wincng.c
libssh2 uses `wincrypt.h` aka the `crypt32` Windows system library for the function `CryptDecodeObjectEx()` [1]. This function has been available for Win32 (and UWP/WinRT apps) for a long while. Even old MinGW supports it, and also Watcom 1.9, of the rare/old compilers I checked. CMake had it permanently enabled, while it also did an extra check for the header to add the lib to the lib list. Autotools did the detection proper. Other builds had it permanently enabled. It seems safe to assume this function/header/lib is available in all environments we support. In this patch we simplify by deleting these detections and feature flags from all build tools. Keep the feature flag internal to `wincng.h`, and for extra safety add the new macro `LIBSSH2_WINCNG_DISABLE_WINCRYPT` do disable it via custom `CPPFLAGS`. WinCNG's other requirement is `bcrypt`. That also has been universally available for a long time. Here the only known outlier is old/legacy MinGW, which is missing support. [1] https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptdecodeobjectex Closes #916
This commit is contained in:
@ -77,9 +77,6 @@
|
||||
/* use Ioctlsocket() for non-blocking sockets */
|
||||
#undef HAVE_IOCTLSOCKET_CASE
|
||||
|
||||
/* Define if you have the crypt32 library. */
|
||||
#undef HAVE_LIBCRYPT32
|
||||
|
||||
/* Define if you have the gcrypt library. */
|
||||
#undef HAVE_LIBGCRYPT
|
||||
|
||||
|
Reference in New Issue
Block a user