plugins/ciphertest.c

changeset 12389
7196ba664097
parent 12388
3a25d96abdaf
child 12459
fa06941b27e1
equal deleted inserted replaced
12388:3a25d96abdaf 12389:7196ba664097
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 {

mercurial