aboutsummaryrefslogtreecommitdiff
path: root/src/testcurl/test_digestauth_with_arguments.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testcurl/test_digestauth_with_arguments.c')
-rw-r--r--src/testcurl/test_digestauth_with_arguments.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
index 602c1180..773fd5f5 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -87,7 +87,7 @@ ahc_echo (void *cls,
87 const char *password = "testpass"; 87 const char *password = "testpass";
88 const char *realm = "test@example.com"; 88 const char *realm = "test@example.com";
89 enum MHD_Result ret; 89 enum MHD_Result ret;
90 int ret_i; 90 enum MHD_DigestAuthResult ret_e;
91 static int already_called_marker; 91 static int already_called_marker;
92 (void) cls; (void) url; /* Unused. Silent compiler warning. */ 92 (void) cls; (void) url; /* Unused. Silent compiler warning. */
93 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */ 93 (void) method; (void) version; (void) upload_data; /* Unused. Silent compiler warning. */
@@ -115,13 +115,13 @@ ahc_echo (void *cls,
115 MHD_destroy_response (response); 115 MHD_destroy_response (response);
116 return ret; 116 return ret;
117 } 117 }
118 ret_i = MHD_digest_auth_check (connection, realm, 118 ret_e = MHD_digest_auth_check3 (connection, realm,
119 username, 119 username,
120 password, 120 password,
121 300); 121 300,
122 MHD_DIGEST_ALG_MD5);
122 MHD_free (username); 123 MHD_free (username);
123 if ( (ret_i == MHD_INVALID_NONCE) || 124 if (ret_e != MHD_DAUTH_OK)
124 (ret_i == MHD_NO) )
125 { 125 {
126 response = MHD_create_response_from_buffer (strlen (DENIED), 126 response = MHD_create_response_from_buffer (strlen (DENIED),
127 DENIED, 127 DENIED,
@@ -131,7 +131,7 @@ ahc_echo (void *cls,
131 ret = MHD_queue_auth_fail_response2 (connection, realm, 131 ret = MHD_queue_auth_fail_response2 (connection, realm,
132 MY_OPAQUE, 132 MY_OPAQUE,
133 response, 133 response,
134 (ret_i == MHD_INVALID_NONCE) ? 134 (ret_e == MHD_DAUTH_NONCE_STALE) ?
135 MHD_YES : MHD_NO, 135 MHD_YES : MHD_NO,
136 MHD_DIGEST_ALG_MD5); 136 MHD_DIGEST_ALG_MD5);
137 MHD_destroy_response (response); 137 MHD_destroy_response (response);