Mercurial > pidgin
comparison plugins/ciphertest.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 | 4e045668b9d0 |
| children | 5f8cfa774141 |
comparison
equal
deleted
inserted
replaced
| 12388:4e045668b9d0 | 12389:e024601d45c7 |
|---|---|
| 182 const gchar *client_nonce = "0a4f113b"; | 182 const gchar *client_nonce = "0a4f113b"; |
| 183 const gchar *username = "Mufasa"; | 183 const gchar *username = "Mufasa"; |
| 184 const gchar *realm = "testrealm@host.com"; | 184 const gchar *realm = "testrealm@host.com"; |
| 185 const gchar *password = "Circle Of Life"; | 185 const gchar *password = "Circle Of Life"; |
| 186 const gchar *algorithm = "md5"; | 186 const gchar *algorithm = "md5"; |
| 187 const gchar nonce_count[] = "00000001"; | 187 const gchar *nonce_count = "00000001"; |
| 188 const gchar *method = "GET"; | 188 const gchar *method = "GET"; |
| 189 const gchar *qop = "auth"; | 189 const gchar *qop = "auth"; |
| 190 const gchar *digest_uri = "/dir/index.html"; | 190 const gchar *digest_uri = "/dir/index.html"; |
| 191 const gchar *hashed_entity = ""; | 191 const gchar *entity = NULL; |
| 192 size_t hashed_entity_len = 0; | |
| 193 | 192 |
| 194 gchar *session_key; | 193 gchar *session_key; |
| 195 | 194 |
| 196 gaim_debug_info("cipher-test", "Running HTTP Digest tests\n"); | 195 gaim_debug_info("cipher-test", "Running HTTP Digest tests\n"); |
| 197 | 196 |
| 210 | 209 |
| 211 gaim_debug_info("cipher-test", "\tsession_key: Got: %s\n", session_key); | 210 gaim_debug_info("cipher-test", "\tsession_key: Got: %s\n", session_key); |
| 212 gaim_debug_info("cipher-test", "\tsession_key: Wanted: %s\n", "939e7578ed9e3c518a452acee763bce9"); | 211 gaim_debug_info("cipher-test", "\tsession_key: Wanted: %s\n", "939e7578ed9e3c518a452acee763bce9"); |
| 213 | 212 |
| 214 response = gaim_cipher_http_digest_calculate_response( | 213 response = gaim_cipher_http_digest_calculate_response( |
| 215 algorithm, method, digest_uri, qop, | 214 algorithm, method, digest_uri, qop, entity, |
| 216 hashed_entity, hashed_entity_len, nonce, | 215 nonce, nonce_count, client_nonce, session_key); |
| 217 nonce_count, client_nonce, session_key); | |
| 218 | 216 |
| 219 g_free(session_key); | 217 g_free(session_key); |
| 220 | 218 |
| 221 if (response == NULL) | 219 if (response == NULL) |
| 222 { | 220 { |
