diff options
Diffstat (limited to 'src/examples/digest_auth_example.c')
-rw-r--r-- | src/examples/digest_auth_example.c | 20 |
1 files changed, 11 insertions, 9 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 | } |