aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-01-27 15:27:16 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-01-27 15:27:16 +0300
commit07008a6f08edf14b6334cbedb0b314611334f402 (patch)
treedf2f693cdc296470e675551662fa8f5de98f2fc8
parent1b1361e4c6e07a74e1a70f96fc570510aaa36815 (diff)
downloadlibmicrohttpd-07008a6f08edf14b6334cbedb0b314611334f402.tar.gz
libmicrohttpd-07008a6f08edf14b6334cbedb0b314611334f402.zip
test_digestauth: use new API
-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 }