Mercurial > pidgin
comparison src/ntlm.c @ 11586:03cd74ca2562
[gaim-migrate @ 13856]
clean up some compile warnings
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 02 Oct 2005 16:50:08 +0000 |
parents | e2ebebcae270 |
children | 4669e7461968 |
comparison
equal
deleted
inserted
replaced
11585:46265a317bd3 | 11586:03cd74ca2562 |
---|---|
129 | 129 |
130 return gaim_base64_encode((guchar*)msg, sizeof(struct type1_message) + strlen(hostname) + strlen(domain)); | 130 return gaim_base64_encode((guchar*)msg, sizeof(struct type1_message) + strlen(hostname) + strlen(domain)); |
131 } | 131 } |
132 | 132 |
133 gchar *gaim_ntlm_parse_type2(gchar *type2) { | 133 gchar *gaim_ntlm_parse_type2(gchar *type2) { |
134 guint retlen; | 134 gsize retlen; |
135 static gchar nonce[8]; | 135 static gchar nonce[8]; |
136 struct type2_message *tmsg = (struct type2_message*)gaim_base64_decode((char*)type2, &retlen); | 136 struct type2_message *tmsg = (struct type2_message*)gaim_base64_decode((char*)type2, &retlen); |
137 memcpy(nonce, tmsg->nonce, 8); | 137 memcpy(nonce, tmsg->nonce, 8); |
138 g_free(tmsg); | 138 g_free(tmsg); |
139 return nonce; | 139 return nonce; |
155 * helper function for gaim cipher.c | 155 * helper function for gaim cipher.c |
156 */ | 156 */ |
157 static void des_ecb_encrypt(char *plaintext, char *result, char *key) { | 157 static void des_ecb_encrypt(char *plaintext, char *result, char *key) { |
158 GaimCipher *cipher; | 158 GaimCipher *cipher; |
159 GaimCipherContext *context; | 159 GaimCipherContext *context; |
160 guint outlen; | 160 gsize outlen; |
161 | 161 |
162 cipher = gaim_ciphers_find_cipher("des"); | 162 cipher = gaim_ciphers_find_cipher("des"); |
163 context = gaim_cipher_context_new(cipher, NULL); | 163 context = gaim_cipher_context_new(cipher, NULL); |
164 gaim_cipher_context_set_key(context, (guchar*)key); | 164 gaim_cipher_context_set_key(context, (guchar*)key); |
165 gaim_cipher_context_encrypt(context, (guchar*)plaintext, 8, (guchar*)result, &outlen); | 165 gaim_cipher_context_encrypt(context, (guchar*)plaintext, 8, (guchar*)result, &outlen); |