# HG changeset patch # User Stu Tomlinson # Date 1126456136 0 # Node ID dc8b8db7f6e3c0e65745c3aa62fe83d12890c17c # Parent 123448afd216fabb6a1530c43afed8d6c58c0488 [gaim-migrate @ 13757] warning fixes committer: Tailor Script diff -r 123448afd216 -r dc8b8db7f6e3 src/protocols/simple/digcalc.c --- a/src/protocols/simple/digcalc.c Sun Sep 11 16:27:47 2005 +0000 +++ b/src/protocols/simple/digcalc.c Sun Sep 11 16:28:56 2005 +0000 @@ -71,19 +71,19 @@ cipher = gaim_ciphers_find_cipher("md5"); context = gaim_cipher_context_new(cipher, NULL); - gaim_cipher_context_append(context, pszUserName, strlen(pszUserName)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszRealm, strlen(pszRealm)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszPassword, strlen(pszPassword)); + gaim_cipher_context_append(context, (guchar *)pszUserName, strlen(pszUserName)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszRealm, strlen(pszRealm)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszPassword, strlen(pszPassword)); gaim_cipher_context_digest(context, sizeof(HA1), HA1, NULL); if (strcmp(pszAlg, "md5-sess") == 0) { context = gaim_cipher_context_new(cipher, NULL); gaim_cipher_context_append(context, HA1, HASHLEN); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszNonce, strlen(pszNonce)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszCNonce, strlen(pszCNonce)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszNonce, strlen(pszNonce)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszCNonce, strlen(pszCNonce)); gaim_cipher_context_digest(context, sizeof(HA1), HA1, NULL); }; CvtHex(HA1, SessionKey); @@ -112,11 +112,11 @@ // calculate H(A2) cipher = gaim_ciphers_find_cipher("md5"); context = gaim_cipher_context_new(cipher, NULL); - gaim_cipher_context_append(context, pszMethod, strlen(pszMethod)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszDigestUri, strlen(pszDigestUri)); + gaim_cipher_context_append(context, (guchar *)pszMethod, strlen(pszMethod)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszDigestUri, strlen(pszDigestUri)); if (strcmp(pszQop, "auth-int") == 0) { - gaim_cipher_context_append(context, ":", 1); + gaim_cipher_context_append(context, (guchar *)":", 1); gaim_cipher_context_append(context, HEntity, HASHHEXLEN); }; gaim_cipher_context_digest(context, sizeof(HA2), HA2, NULL); @@ -126,16 +126,16 @@ // calculate response context = gaim_cipher_context_new(cipher, NULL); gaim_cipher_context_append(context, HA1, HASHHEXLEN); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszNonce, strlen(pszNonce)); - gaim_cipher_context_append(context, ":", 1); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszNonce, strlen(pszNonce)); + gaim_cipher_context_append(context, (guchar *)":", 1); if (*pszQop) { - gaim_cipher_context_append(context, pszNonceCount, strlen(pszNonceCount)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszCNonce, strlen(pszCNonce)); - gaim_cipher_context_append(context, ":", 1); - gaim_cipher_context_append(context, pszQop, strlen(pszQop)); - gaim_cipher_context_append(context, ":", 1); + gaim_cipher_context_append(context, (guchar *)pszNonceCount, strlen(pszNonceCount)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszCNonce, strlen(pszCNonce)); + gaim_cipher_context_append(context, (guchar *)":", 1); + gaim_cipher_context_append(context, (guchar *)pszQop, strlen(pszQop)); + gaim_cipher_context_append(context, (guchar *)":", 1); }; gaim_cipher_context_append(context, HA2Hex, HASHHEXLEN); gaim_cipher_context_digest(context, sizeof(RespHash), RespHash, NULL); diff -r 123448afd216 -r dc8b8db7f6e3 src/protocols/simple/digcalc.h --- a/src/protocols/simple/digcalc.h Sun Sep 11 16:27:47 2005 +0000 +++ b/src/protocols/simple/digcalc.h Sun Sep 11 16:28:56 2005 +0000 @@ -28,9 +28,9 @@ */ #define HASHLEN 16 -typedef char HASH[HASHLEN]; +typedef guchar HASH[HASHLEN]; #define HASHHEXLEN 32 -typedef char HASHHEX[HASHHEXLEN+1]; +typedef guchar HASHHEX[HASHHEXLEN+1]; #define IN #define OUT