39#if ! defined(BAUTH_SUPPORT) && ! defined(DAUTH_SUPPORT)
40#error This file requires Basic or Digest authentication support
97 for (
h =
c->rq.headers_received;
NULL !=
h;
h =
h->next)
160 while (
i <
str_len && (
' ' == str[
i] ||
'\t' == str[
i]))
171 while (
i <
str_len &&
' ' != str[
i] &&
'\t' != str[
i])
175 if ((
',' == str[
i]) || (
';' == str[
i]))
183 while (
i <
str_len && (
' ' == str[
i] ||
'\t' == str[
i]))
219 if (connection->
rq.bauth_tried)
220 return connection->
rq.bauth;
227 connection->
rq.bauth_tried =
true;
228 connection->
rq.bauth =
NULL;
240 _ (
"Not enough memory in the connection's pool to allocate " \
241 "for Basic Authorization header parsing.\n"));
253 _ (
"The Basic Authorization client's header has "
254 "incorrect format.\n"));
256 connection->
rq.bauth =
NULL;
259 connection->
rq.bauth_tried =
true;
260 return connection->
rq.bauth;
465 while (
i <
str_len && (
' ' == str[
i] ||
'\t' == str[
i]))
501 while (
str_len >
i && (
' ' == str[
i] ||
'\t' == str[
i]))
507 while (
str_len >
i && (
' ' == str[
i] ||
'\t' == str[
i]))
534 ' ' != str[
i] &&
'\t' != str[
i] &&
';' != str[
i])
545 while (
str_len >
i && (
' ' == str[
i] ||
'\t' == str[
i]))
552 param->value.str = str + value_start;
564 if ((0 == str[
i]) || (
';' == str[
i]))
588 while (
i <
str_len && (
' ' == str[
i] ||
'\t' == str[
i]))
637 if (connection->
rq.dauth_tried)
638 return connection->
rq.dauth;
645 connection->
rq.dauth_tried =
true;
646 connection->
rq.dauth =
NULL;
658 _ (
"Not enough memory in the connection's pool to allocate " \
659 "for Digest Authorization header parsing.\n"));
671 _ (
"The Digest Authorization client's header has "
672 "incorrect format.\n"));
674 connection->
rq.dauth =
NULL;
677 connection->
rq.dauth_tried =
true;
678 return connection->
rq.dauth;
#define _MHD_AUTH_BASIC_BASE
void * MHD_connection_alloc_memory_(struct MHD_Connection *connection, size_t size)
Methods for managing connections.
#define MHD_TOKEN_AUTH_INT_
#define _MHD_SHA256_TOKEN
#define _MHD_SHA512_256_TOKEN
#define _MHD_AUTH_DIGEST_BASE
static bool find_auth_rq_header_(const struct MHD_Connection *c, enum MHD_AuthType type, struct _MHD_str_w_len *auth_value)
Declarations for HTTP authorisation general functions.
#define MHD_STATICSTR_LEN_(macro)
#define _MHD_S_STR_W_LEN(str)
MHD internal shared structures.
@ MHD_CONNECTION_HEADERS_PROCESSED
bool MHD_str_equal_caseless_bin_n_(const char *const str1, const char *const str2, size_t len)
Header for string manipulating helpers.
#define MHD_str_equal_caseless_s_bin_n_(a, s, l)
@ MHD_DIGEST_AUTH_ALGO3_MD5_SESSION
@ MHD_DIGEST_AUTH_ALGO3_MD5
@ MHD_DIGEST_AUTH_ALGO3_SHA256
@ MHD_DIGEST_AUTH_ALGO3_SHA512_256_SESSION
@ MHD_DIGEST_AUTH_ALGO3_INVALID
@ MHD_DIGEST_AUTH_ALGO3_SHA256_SESSION
@ MHD_DIGEST_AUTH_ALGO3_SHA512_256
@ MHD_DIGEST_AUTH_QOP_AUTH
@ MHD_DIGEST_AUTH_QOP_INVALID
@ MHD_DIGEST_AUTH_QOP_NONE
@ MHD_DIGEST_AUTH_QOP_AUTH_INT
enum MHD_CONNECTION_STATE state
struct MHD_Daemon * daemon