aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_digestauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_digestauth.c')
-rw-r--r--src/testcurl/test_digestauth.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index a2b38b2e..e05e4f31 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -265,7 +265,7 @@ ahc_echo (void *cls,
265 const char *password = "testpass"; 265 const char *password = "testpass";
266 const char *realm = "test@example.com"; 266 const char *realm = "test@example.com";
267 enum MHD_Result ret; 267 enum MHD_Result ret;
268 int ret_i; 268 enum MHD_DigestAuthResult ret_e;
269 static int already_called_marker; 269 static int already_called_marker;
270 (void) cls; (void) url; /* Unused. Silent compiler warning. */ 270 (void) cls; (void) url; /* Unused. Silent compiler warning. */
271 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ 271 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */
@@ -298,15 +298,14 @@ ahc_echo (void *cls,
298 MHD_destroy_response (response); 298 MHD_destroy_response (response);
299 return ret; 299 return ret;
300 } 300 }
301 ret_i = MHD_digest_auth_check2 (connection, 301 ret_e = MHD_digest_auth_check3 (connection,
302 realm, 302 realm,
303 username, 303 username,
304 password, 304 password,
305 300, 305 300,
306 MHD_DIGEST_ALG_MD5); 306 MHD_DIGEST_ALG_MD5);
307 MHD_free (username); 307 MHD_free (username);
308 if ( (ret_i == MHD_INVALID_NONCE) || 308 if (ret_e != MHD_DAUTH_OK)
309 (ret_i == MHD_NO) )
310 { 309 {
311 response = MHD_create_response_from_buffer (strlen (DENIED), 310 response = MHD_create_response_from_buffer (strlen (DENIED),
312 DENIED, 311 DENIED,
@@ -317,7 +316,7 @@ ahc_echo (void *cls,
317 realm, 316 realm,
318 MY_OPAQUE, 317 MY_OPAQUE,
319 response, 318 response,
320 (MHD_INVALID_NONCE == ret_i) ? 319 (MHD_DAUTH_NONCE_STALE == ret_e) ?
321 MHD_YES : MHD_NO, 320 MHD_YES : MHD_NO,
322 MHD_DIGEST_ALG_MD5); 321 MHD_DIGEST_ALG_MD5);
323 if (MHD_YES != ret) 322 if (MHD_YES != ret)