aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/digest_auth_example.c20
-rw-r--r--src/testcurl/test_digestauth_sha256.c2
-rw-r--r--src/testcurl/test_digestauth_with_arguments.c22
3 files changed, 24 insertions, 20 deletions
diff --git a/src/examples/digest_auth_example.c b/src/examples/digest_auth_example.c
index ea3da19a..68d13c84 100644
--- a/src/examples/digest_auth_example.c
+++ b/src/examples/digest_auth_example.c
@@ -70,10 +70,11 @@ ahc_echo (void *cls,
70 response = MHD_create_response_from_buffer (strlen (DENIED), 70 response = MHD_create_response_from_buffer (strlen (DENIED),
71 DENIED, 71 DENIED,
72 MHD_RESPMEM_PERSISTENT); 72 MHD_RESPMEM_PERSISTENT);
73 ret = MHD_queue_auth_fail_response (connection, realm, 73 ret = MHD_queue_auth_fail_response2 (connection, realm,
74 MY_OPAQUE_STR, 74 MY_OPAQUE_STR,
75 response, 75 response,
76 MHD_NO); 76 MHD_NO,
77 MHD_DIGEST_ALG_MD5);
77 MHD_destroy_response (response); 78 MHD_destroy_response (response);
78 return ret; 79 return ret;
79 } 80 }
@@ -90,11 +91,12 @@ ahc_echo (void *cls,
90 MHD_RESPMEM_PERSISTENT); 91 MHD_RESPMEM_PERSISTENT);
91 if (NULL == response) 92 if (NULL == response)
92 return MHD_NO; 93 return MHD_NO;
93 ret = MHD_queue_auth_fail_response (connection, realm, 94 ret = MHD_queue_auth_fail_response2 (connection, realm,
94 MY_OPAQUE_STR, 95 MY_OPAQUE_STR,
95 response, 96 response,
96 (res == MHD_INVALID_NONCE) ? MHD_YES : 97 (res == MHD_INVALID_NONCE) ? MHD_YES :
97 MHD_NO); 98 MHD_NO,
99 MHD_DIGEST_ALG_MD5);
98 MHD_destroy_response (response); 100 MHD_destroy_response (response);
99 return ret; 101 return ret;
100 } 102 }
diff --git a/src/testcurl/test_digestauth_sha256.c b/src/testcurl/test_digestauth_sha256.c
index fff3a1d7..f6df664e 100644
--- a/src/testcurl/test_digestauth_sha256.c
+++ b/src/testcurl/test_digestauth_sha256.c
@@ -129,7 +129,7 @@ ahc_echo (void *cls,
129 password, 129 password,
130 300, 130 300,
131 MHD_DIGEST_ALG_SHA256); 131 MHD_DIGEST_ALG_SHA256);
132 free (username); 132 MHD_free (username);
133 if ( (ret_i == MHD_INVALID_NONCE) || 133 if ( (ret_i == MHD_INVALID_NONCE) ||
134 (ret_i == MHD_NO) ) 134 (ret_i == MHD_NO) )
135 { 135 {
diff --git a/src/testcurl/test_digestauth_with_arguments.c b/src/testcurl/test_digestauth_with_arguments.c
index 91f2dd67..ac1aed56 100644
--- a/src/testcurl/test_digestauth_with_arguments.c
+++ b/src/testcurl/test_digestauth_with_arguments.c
@@ -107,10 +107,11 @@ ahc_echo (void *cls,
107 response = MHD_create_response_from_buffer (strlen (DENIED), 107 response = MHD_create_response_from_buffer (strlen (DENIED),
108 DENIED, 108 DENIED,
109 MHD_RESPMEM_PERSISTENT); 109 MHD_RESPMEM_PERSISTENT);
110 ret = MHD_queue_auth_fail_response (connection, realm, 110 ret = MHD_queue_auth_fail_response2 (connection, realm,
111 MY_OPAQUE, 111 MY_OPAQUE,
112 response, 112 response,
113 MHD_NO); 113 MHD_NO,
114 MHD_DIGEST_ALG_MD5);
114 MHD_destroy_response (response); 115 MHD_destroy_response (response);
115 return ret; 116 return ret;
116 } 117 }
@@ -118,7 +119,7 @@ ahc_echo (void *cls,
118 username, 119 username,
119 password, 120 password,
120 300); 121 300);
121 free (username); 122 MHD_free (username);
122 if ( (ret_i == MHD_INVALID_NONCE) || 123 if ( (ret_i == MHD_INVALID_NONCE) ||
123 (ret_i == MHD_NO) ) 124 (ret_i == MHD_NO) )
124 { 125 {
@@ -127,11 +128,12 @@ ahc_echo (void *cls,
127 MHD_RESPMEM_PERSISTENT); 128 MHD_RESPMEM_PERSISTENT);
128 if (NULL == response) 129 if (NULL == response)
129 return MHD_NO; 130 return MHD_NO;
130 ret = MHD_queue_auth_fail_response (connection, realm, 131 ret = MHD_queue_auth_fail_response2 (connection, realm,
131 MY_OPAQUE, 132 MY_OPAQUE,
132 response, 133 response,
133 (ret_i == MHD_INVALID_NONCE) ? 134 (ret_i == MHD_INVALID_NONCE) ?
134 MHD_YES : MHD_NO); 135 MHD_YES : MHD_NO,
136 MHD_DIGEST_ALG_MD5);
135 MHD_destroy_response (response); 137 MHD_destroy_response (response);
136 return ret; 138 return ret;
137 } 139 }