libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 07008a6f08edf14b6334cbedb0b314611334f402
parent 1b1361e4c6e07a74e1a70f96fc570510aaa36815
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Thu, 27 Jan 2022 15:27:16 +0300

test_digestauth: use new API

Diffstat:
Msrc/testcurl/test_digestauth.c | 35+++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/src/testcurl/test_digestauth.c b/src/testcurl/test_digestauth.c @@ -113,19 +113,21 @@ ahc_echo (void *cls, response = MHD_create_response_from_buffer (strlen (DENIED), DENIED, MHD_RESPMEM_PERSISTENT); - ret = MHD_queue_auth_fail_response (connection, - realm, - MY_OPAQUE, - response, - MHD_NO); + ret = MHD_queue_auth_fail_response2 (connection, + realm, + MY_OPAQUE, + response, + MHD_NO, + MHD_DIGEST_ALG_MD5); MHD_destroy_response (response); return ret; } - ret_i = MHD_digest_auth_check (connection, - realm, - username, - password, - 300); + ret_i = MHD_digest_auth_check2 (connection, + realm, + username, + password, + 300, + MHD_DIGEST_ALG_MD5); free (username); if ( (ret_i == MHD_INVALID_NONCE) || (ret_i == MHD_NO) ) @@ -135,12 +137,13 @@ ahc_echo (void *cls, MHD_RESPMEM_PERSISTENT); if (NULL == response) return MHD_NO; - ret = MHD_queue_auth_fail_response (connection, - realm, - MY_OPAQUE, - response, - (MHD_INVALID_NONCE == ret_i) ? - MHD_YES : MHD_NO); + ret = MHD_queue_auth_fail_response2 (connection, + realm, + MY_OPAQUE, + response, + (MHD_INVALID_NONCE == ret_i) ? + MHD_YES : MHD_NO, + MHD_DIGEST_ALG_MD5); MHD_destroy_response (response); return ret; }