diff options
Diffstat (limited to 'src/microhttpd/digestauth.h')
-rw-r--r-- | src/microhttpd/digestauth.h | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/src/microhttpd/digestauth.h b/src/microhttpd/digestauth.h index 689c0487..77c7c402 100644 --- a/src/microhttpd/digestauth.h +++ b/src/microhttpd/digestauth.h | |||
@@ -28,10 +28,48 @@ | |||
28 | 28 | ||
29 | #ifndef MHD_DIGESTAUTH_H | 29 | #ifndef MHD_DIGESTAUTH_H |
30 | #define MHD_DIGESTAUTH_H 1 | 30 | #define MHD_DIGESTAUTH_H 1 |
31 | |||
32 | #include "mhd_options.h" | ||
33 | #include "mhd_str.h" | ||
34 | #ifdef HAVE_STDBOOL_H | ||
35 | #include <stdbool.h> | ||
36 | #endif /* HAVE_STDBOOL_H */ | ||
37 | |||
38 | |||
39 | /** | ||
40 | * The maximum supported size for Digest Auth parameters, like "real", | ||
41 | * "username" etc. This limitation is used only for quoted parameters. | ||
42 | * Parameters without quoted backslash character will be processed as long | ||
43 | * as they fit connection pool (buffer) size. | ||
44 | */ | ||
45 | #define _MHD_AUTH_DIGEST_MAX_PARAM_SIZE (65535) | ||
46 | |||
31 | /** | 47 | /** |
32 | * Beginning string for any valid Digest authentication header. | 48 | * Beginning string for any valid Digest Authentication header. |
33 | */ | 49 | */ |
34 | #define _MHD_AUTH_DIGEST_BASE "Digest " | 50 | #define _MHD_AUTH_DIGEST_BASE "Digest" |
51 | |||
52 | struct MHD_RqDAuthParam | ||
53 | { | ||
54 | struct _MHD_cstr_w_len value; | ||
55 | bool quoted; | ||
56 | }; | ||
57 | |||
58 | struct MHD_RqDAuth | ||
59 | { | ||
60 | struct MHD_RqDAuthParam nonce; | ||
61 | struct MHD_RqDAuthParam opaque; | ||
62 | struct MHD_RqDAuthParam algorithm; | ||
63 | struct MHD_RqDAuthParam response; | ||
64 | struct MHD_RqDAuthParam username; | ||
65 | struct MHD_RqDAuthParam username_ext; | ||
66 | struct MHD_RqDAuthParam realm; | ||
67 | struct MHD_RqDAuthParam uri; | ||
68 | struct MHD_RqDAuthParam qop; | ||
69 | struct MHD_RqDAuthParam cnonce; | ||
70 | struct MHD_RqDAuthParam nc; | ||
71 | bool userhash; | ||
72 | }; | ||
35 | 73 | ||
36 | #endif /* ! MHD_DIGESTAUTH_H */ | 74 | #endif /* ! MHD_DIGESTAUTH_H */ |
37 | 75 | ||