aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-12-24 22:22:07 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-12-24 22:22:07 +0000
commited16a1695f40e6b3dee6c7cf091eecb8839f88b9 (patch)
treefe7f358b457c0c2b774172a43a56612b931abfcd
parent7c66ab502946d0ad48b8a7485dcc3bac82178a13 (diff)
curl_ntlm_core.c: Fixed compilation warnings
curl_ntlm_core.c:301: warning: pointer targets in passing argument 2 of 'CryptImportKey' differ in signedness curl_ntlm_core.c:310: warning: passing argument 6 of 'CryptEncrypt' from incompatible pointer type curl_ntlm_core.c:540: warning: passing argument 4 of 'CryptGetHashParam' from incompatible pointer type
-rw-r--r--lib/curl_ntlm_core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index 83ca56048..778f729a4 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -283,7 +283,7 @@ static bool encrypt_des(const unsigned char *in, unsigned char *out,
unsigned int len;
char key[8];
} blob;
- unsigned int len = 8;
+ DWORD len = 8;
/* Acquire the crypto provider */
if(!CryptAcquireContext(&hprov, NULL, NULL, PROV_RSA_FULL,
@@ -298,7 +298,7 @@ static bool encrypt_des(const unsigned char *in, unsigned char *out,
blob.len = sizeof(blob.key);
/* Import the key */
- if(!CryptImportKey(hprov, (char *) &blob, sizeof(blob), 0, 0, &hkey)) {
+ if(!CryptImportKey(hprov, (BYTE *) &blob, sizeof(blob), 0, 0, &hkey)) {
CryptReleaseContext(hprov, 0);
return FALSE;
@@ -535,7 +535,7 @@ CURLcode Curl_ntlm_core_mk_nt_hash(struct SessionHandle *data,
CRYPT_VERIFYCONTEXT)) {
HCRYPTHASH hhash;
if(CryptCreateHash(hprov, CALG_MD4, 0, 0, &hhash)) {
- unsigned int length = 16;
+ DWORD length = 16;
CryptHashData(hhash, pw, (unsigned int)len * 2, 0);
CryptGetHashParam(hhash, HP_HASHVAL, ntbuffer, &length, 0);
CryptDestroyHash(hhash);