]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
schannel: workaround for wrong function signature in w32api
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 8 Jul 2018 15:00:01 +0000 (17:00 +0200)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 9 Jul 2018 16:08:56 +0000 (18:08 +0200)
Original MinGW's w32api has CryptHashData's second parameter as BYTE *
instead of const BYTE *.

Closes https://github.com/curl/curl/pull/2721

lib/vtls/schannel.c

index 2e2b198c4e7973f1473b442f78532fd634542aa9..b72542225bb0cbe887bcb1a35337a9d096f42ce7 100644 (file)
@@ -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 */