config: fix building SMB with configure using Win32 Crypto

Align conditions for NTLM features between CMake and configure
builds by differentiating between USE_NTLM and USE_CURL_NTLM_CORE,
just like curl_setup.h does internally to detect support of:

- USE_NTLM: required for NTLM crypto authentication feature
- USE_CURL_NTLM_CORE: required for SMB protocol

Implement USE_WIN32_CRYPTO detection by checking for Crypt functions
in wincrypt.h which are not available in the Windows App environment.

Link advapi32 and crypt32 for Crypto API and Schannel SSL backend.
Fix condition of Schannel SSL backend in CMake build accordingly.

Reviewed-by: Marcel Raad

Closes #6277
This commit is contained in:
Marc Hoersken 2021-03-06 15:52:09 +01:00
parent 7152957421
commit cc615f48e7
No known key found for this signature in database
GPG key ID: 61E03CBED7BC859E
4 changed files with 131 additions and 39 deletions

View file

@ -98,7 +98,7 @@
#endif
/* Allow SMB to work on Windows */
#cmakedefine USE_WIN32_CRYPTO
#cmakedefine USE_WIN32_CRYPTO 1
/* Use Windows LDAP implementation */
#cmakedefine USE_WIN32_LDAP 1