summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-08 17:00:01 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-09 18:08:56 +0200
commit07f7c93f92c15e1a4a6489a05b1eb4c7b33cf6a4 (patch)
treef35933358503f9ba2d8c709f443b0e801bd50f99
parenta189ab91fec2fe1a5755d689603a381eea9529e4 (diff)
downloadcurl-07f7c93f92c15e1a4a6489a05b1eb4c7b33cf6a4.tar.gz
schannel: workaround for wrong function signature in w32api
Original MinGW's w32api has CryptHashData's second parameter as BYTE * instead of const BYTE *. Closes https://github.com/curl/curl/pull/2721
-rw-r--r--lib/vtls/schannel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index 2e2b198c4..b72542225 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -2053,7 +2053,8 @@ static void Curl_schannel_checksum(const unsigned char *input,
if(!CryptCreateHash(hProv, algId, 0, 0, &hHash))
break; /* failed */
- if(!CryptHashData(hHash, (const BYTE*)input, (DWORD)inputlen, 0))
+ /* workaround for original MinGW, should be (const BYTE*) */
+ if(!CryptHashData(hHash, (BYTE*)input, (DWORD)inputlen, 0))
break; /* failed */
/* get hash size */