gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 01/05: test_digestauth: use new API


From: gnunet
Subject: [libmicrohttpd] 01/05: test_digestauth: use new API
Date: Thu, 27 Jan 2022 17:18:22 +0100

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

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

    test_digestauth: use new API
---
 src/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
index 5dd9d466..5bf5e8e0 100644
--- 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;
   }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]