Unverified Commit 07f7c93f authored by Marcel Raad's avatar Marcel Raad
Browse files

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
parent a189ab91
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 */