1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

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
This commit is contained in:
Marcel Raad 2018-07-08 17:00:01 +02:00
parent a189ab91fe
commit 07f7c93f92
No known key found for this signature in database
GPG Key ID: 07ADACB610D796DA

View 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 */