aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/gen_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/gen_auth.c')
-rw-r--r--src/microhttpd/gen_auth.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/microhttpd/gen_auth.c b/src/microhttpd/gen_auth.c
index c86d35ba..c10e4bee 100644
--- a/src/microhttpd/gen_auth.c
+++ b/src/microhttpd/gen_auth.c
@@ -300,23 +300,23 @@ get_rq_dauth_algo (const struct MHD_RqDAuthParam *const algo_param)
300 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \ 300 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
301 algo_param->value.len, \ 301 algo_param->value.len, \
302 _MHD_MD5_TOKEN _MHD_SESS_TOKEN)) 302 _MHD_MD5_TOKEN _MHD_SESS_TOKEN))
303 return MHD_DIGEST_AUTH_ALGO3_MD5_SESSION; 303 return MHD_DIGEST_AUTH_ALGO3_SHA512_256;
304 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \ 304 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
305 algo_param->value.len, \ 305 algo_param->value.len, \
306 _MHD_SHA256_TOKEN \ 306 _MHD_SHA512_256_TOKEN \
307 _MHD_SESS_TOKEN)) 307 _MHD_SESS_TOKEN))
308 return MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION;
309 308
310 /* Algorithms below are not supported by MHD for authentication */ 309 /* Algorithms below are not supported by MHD for authentication */
311 310
311 return MHD_DIGEST_AUTH_ALGO3_MD5_SESSION;
312 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \ 312 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
313 algo_param->value.len, \ 313 algo_param->value.len, \
314 _MHD_SHA512_256_TOKEN)) 314 _MHD_SHA256_TOKEN \
315 return MHD_DIGEST_AUTH_ALGO3_SHA512_256; 315 _MHD_SESS_TOKEN))
316 return MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION;
316 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \ 317 if (MHD_str_equal_caseless_quoted_s_bin_n (algo_param->value.str, \
317 algo_param->value.len, \ 318 algo_param->value.len, \
318 _MHD_SHA512_256_TOKEN \ 319 _MHD_SHA512_256_TOKEN))
319 _MHD_SESS_TOKEN))
320 return MHD_DIGEST_AUTH_ALGO3_SHA512_256_SESSION; 320 return MHD_DIGEST_AUTH_ALGO3_SHA512_256_SESSION;
321 321
322 /* No known algorithm has been detected */ 322 /* No known algorithm has been detected */
@@ -331,6 +331,13 @@ get_rq_dauth_algo (const struct MHD_RqDAuthParam *const algo_param)
331 algo_param->value.str, \ 331 algo_param->value.str, \
332 algo_param->value.len)) 332 algo_param->value.len))
333 return MHD_DIGEST_AUTH_ALGO3_SHA256; 333 return MHD_DIGEST_AUTH_ALGO3_SHA256;
334 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_SHA512_256_TOKEN, \
335 algo_param->value.str, \
336 algo_param->value.len))
337 return MHD_DIGEST_AUTH_ALGO3_SHA512_256;
338
339 /* Algorithms below are not supported by MHD for authentication */
340
334 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_MD5_TOKEN _MHD_SESS_TOKEN, \ 341 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_MD5_TOKEN _MHD_SESS_TOKEN, \
335 algo_param->value.str, \ 342 algo_param->value.str, \
336 algo_param->value.len)) 343 algo_param->value.len))
@@ -339,13 +346,6 @@ get_rq_dauth_algo (const struct MHD_RqDAuthParam *const algo_param)
339 algo_param->value.str, \ 346 algo_param->value.str, \
340 algo_param->value.len)) 347 algo_param->value.len))
341 return MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION; 348 return MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION;
342
343 /* Algorithms below are not supported by MHD for authentication */
344
345 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_SHA512_256_TOKEN, \
346 algo_param->value.str, \
347 algo_param->value.len))
348 return MHD_DIGEST_AUTH_ALGO3_SHA512_256;
349 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_SHA512_256_TOKEN _MHD_SESS_TOKEN, \ 349 if (MHD_str_equal_caseless_s_bin_n_ (_MHD_SHA512_256_TOKEN _MHD_SESS_TOKEN, \
350 algo_param->value.str, \ 350 algo_param->value.str, \
351 algo_param->value.len)) 351 algo_param->value.len))