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.c35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c
index 5dd9d466..5bf5e8e0 100644
--- a/src/testcurl/test_digestauth.c
+++ b/src/testcurl/test_digestauth.c
@@ -113,19 +113,21 @@ ahc_echo (void *cls,
113 response = MHD_create_response_from_buffer (strlen (DENIED), 113 response = MHD_create_response_from_buffer (strlen (DENIED),
114 DENIED, 114 DENIED,
115 MHD_RESPMEM_PERSISTENT); 115 MHD_RESPMEM_PERSISTENT);
116 ret = MHD_queue_auth_fail_response (connection, 116 ret = MHD_queue_auth_fail_response2 (connection,
117 realm, 117 realm,
118 MY_OPAQUE, 118 MY_OPAQUE,
119 response, 119 response,
120 MHD_NO); 120 MHD_NO,
121 MHD_DIGEST_ALG_MD5);
121 MHD_destroy_response (response); 122 MHD_destroy_response (response);
122 return ret; 123 return ret;
123 } 124 }
124 ret_i = MHD_digest_auth_check (connection, 125 ret_i = MHD_digest_auth_check2 (connection,
125 realm, 126 realm,
126 username, 127 username,
127 password, 128 password,
128 300); 129 300,
130 MHD_DIGEST_ALG_MD5);
129 free (username); 131 free (username);
130 if ( (ret_i == MHD_INVALID_NONCE) || 132 if ( (ret_i == MHD_INVALID_NONCE) ||
131 (ret_i == MHD_NO) ) 133 (ret_i == MHD_NO) )
@@ -135,12 +137,13 @@ ahc_echo (void *cls,
135 MHD_RESPMEM_PERSISTENT); 137 MHD_RESPMEM_PERSISTENT);
136 if (NULL == response) 138 if (NULL == response)
137 return MHD_NO; 139 return MHD_NO;
138 ret = MHD_queue_auth_fail_response (connection, 140 ret = MHD_queue_auth_fail_response2 (connection,
139 realm, 141 realm,
140 MY_OPAQUE, 142 MY_OPAQUE,
141 response, 143 response,
142 (MHD_INVALID_NONCE == ret_i) ? 144 (MHD_INVALID_NONCE == ret_i) ?
143 MHD_YES : MHD_NO); 145 MHD_YES : MHD_NO,
146 MHD_DIGEST_ALG_MD5);
144 MHD_destroy_response (response); 147 MHD_destroy_response (response);
145 return ret; 148 return ret;
146 } 149 }