Mercurial > pidgin
comparison src/protocols/simple/simple.c @ 12389:e024601d45c7
[gaim-migrate @ 14695]
How about we allow callers to pass in the entity body, rather than forcing them to hash it themselves?
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Wed, 07 Dec 2005 11:01:49 +0000 |
parents | cfc808463763 |
children | ca4021fe9a1c |
comparison
equal
deleted
inserted
replaced
12388:4e045668b9d0 | 12389:e024601d45c7 |
---|---|
265 gchar *tmp; | 265 gchar *tmp; |
266 | 266 |
267 if(auth->type == 1) { /* Digest */ | 267 if(auth->type == 1) { /* Digest */ |
268 sprintf(noncecount, "%08d", auth->nc++); | 268 sprintf(noncecount, "%08d", auth->nc++); |
269 response = gaim_cipher_http_digest_calculate_response( | 269 response = gaim_cipher_http_digest_calculate_response( |
270 "md5", method, target, NULL, NULL, 0, | 270 "md5", method, target, NULL, NULL, |
271 auth->nonce, noncecount, NULL, auth->digest_session_key); | 271 auth->nonce, noncecount, NULL, auth->digest_session_key); |
272 gaim_debug(GAIM_DEBUG_MISC, "simple", "response %s\n", response); | 272 gaim_debug(GAIM_DEBUG_MISC, "simple", "response %s\n", response); |
273 | 273 |
274 ret = g_strdup_printf("Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", nc=\"%s\", response=\"%s\"\r\n", sip->username, auth->realm, auth->nonce, target, noncecount, response); | 274 ret = g_strdup_printf("Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", nc=\"%s\", response=\"%s\"\r\n", sip->username, auth->realm, auth->nonce, target, noncecount, response); |
275 g_free(response); | 275 g_free(response); |
287 return tmp; | 287 return tmp; |
288 } | 288 } |
289 | 289 |
290 sprintf(noncecount, "%08d", auth->nc++); | 290 sprintf(noncecount, "%08d", auth->nc++); |
291 response = gaim_cipher_http_digest_calculate_response( | 291 response = gaim_cipher_http_digest_calculate_response( |
292 "md5", method, target, NULL, NULL, 0, | 292 "md5", method, target, NULL, NULL, |
293 auth->nonce, noncecount, NULL, auth->digest_session_key); | 293 auth->nonce, noncecount, NULL, auth->digest_session_key); |
294 gaim_debug(GAIM_DEBUG_MISC, "simple", "response %s\n", response); | 294 gaim_debug(GAIM_DEBUG_MISC, "simple", "response %s\n", response); |
295 | 295 |
296 ret = g_strdup_printf("Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", nc=\"%s\", response=\"%s\"\r\n", sip->username, auth->realm, auth->nonce, target, noncecount, response); | 296 ret = g_strdup_printf("Digest username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", nc=\"%s\", response=\"%s\"\r\n", sip->username, auth->realm, auth->nonce, target, noncecount, response); |
297 g_free(response); | 297 g_free(response); |