cmake: Enable SMB for Windows builds

- Define USE_WIN32_CRYPTO by default. This enables SMB.

- Show whether SMB is enabled in the "Enabled features" output.

- Fix mingw compiler warning for call to CryptHashData by casting away
  const param. mingw CryptHashData prototype is wrong.

Closes https://github.com/curl/curl/pull/4717
This commit is contained in:
Marc Aldorasi 2019-12-13 17:23:11 -05:00 committed by Jay Satiro
parent c9c551f1f9
commit ea6d6205d9
3 changed files with 22 additions and 6 deletions

View file

@ -73,6 +73,9 @@
#define CURL_EXTERN_SYMBOL
#endif
/* Allow SMB to work on Windows */
#cmakedefine USE_WIN32_CRYPTO
/* Use Windows LDAP implementation */
#cmakedefine USE_WIN32_LDAP 1

View file

@ -156,7 +156,7 @@ static void MD4_Init(MD4_CTX *ctx)
static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
{
CryptHashData(ctx->hHash, data, (unsigned int) size, 0);
CryptHashData(ctx->hHash, (BYTE *)data, (unsigned int) size, 0);
}
static void MD4_Final(unsigned char *result, MD4_CTX *ctx)