diff options
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index ac2bb921..d50672ec 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -168,12 +168,6 @@ enum MHD_Result | |||
168 | 168 | ||
169 | } _MHD_FIXED_ENUM; | 169 | } _MHD_FIXED_ENUM; |
170 | 170 | ||
171 | |||
172 | /** | ||
173 | * MHD digest auth internal code for an invalid nonce. | ||
174 | */ | ||
175 | #define MHD_INVALID_NONCE -1 | ||
176 | |||
177 | /** | 171 | /** |
178 | * Constant used to indicate unknown size (use when | 172 | * Constant used to indicate unknown size (use when |
179 | * creating a response). | 173 | * creating a response). |
@@ -1546,8 +1540,9 @@ typedef int | |||
1546 | * These values can limit the scope of validity of MHD-generated nonces. | 1540 | * These values can limit the scope of validity of MHD-generated nonces. |
1547 | * Values can be combined with bitwise OR. | 1541 | * Values can be combined with bitwise OR. |
1548 | * Any value, except #MHD_DAUTH_BIND_NONCE_NONE, enforce function | 1542 | * Any value, except #MHD_DAUTH_BIND_NONCE_NONE, enforce function |
1549 | * #MHD_digest_auth_check3() (and similar) to check nonce by re-generating | 1543 | * #MHD_digest_auth_check3() (and similar functions) to check nonce by |
1550 | * it again with the same parameters, which is CPU-intensive operation. | 1544 | * re-generating it again with the same parameters, which is CPU-intensive |
1545 | * operation. | ||
1551 | * @note Available since #MHD_VERSION 0x00097531 | 1546 | * @note Available since #MHD_VERSION 0x00097531 |
1552 | */ | 1547 | */ |
1553 | enum MHD_DAuthBindNonce | 1548 | enum MHD_DAuthBindNonce |
@@ -1555,13 +1550,13 @@ enum MHD_DAuthBindNonce | |||
1555 | /** | 1550 | /** |
1556 | * Generated nonces are valid for any request from any client until expired. | 1551 | * Generated nonces are valid for any request from any client until expired. |
1557 | * This is default and recommended value. | 1552 | * This is default and recommended value. |
1558 | * #MHD_digest_auth_check3() (and similar function) would check only whether | 1553 | * #MHD_digest_auth_check3() (and similar functions) would check only whether |
1559 | * the nonce value that is used by client has been generated by MHD and not | 1554 | * the nonce value that is used by client has been generated by MHD and not |
1560 | * expired yet. | 1555 | * expired yet. |
1561 | * It is recommended because RFC 7616 allows clients to use the same nonce | 1556 | * It is recommended because RFC 7616 allows clients to use the same nonce |
1562 | * for any request in the same "protection space". | 1557 | * for any request in the same "protection space". |
1563 | * CPU is loaded less when this value is used when checking client's | 1558 | * CPU is loaded less when this value is used when checking client's |
1564 | * authorisation request. | 1559 | * authorisation requests. |
1565 | * This mode gives MHD maximum flexibility for nonces generation and can | 1560 | * This mode gives MHD maximum flexibility for nonces generation and can |
1566 | * prevent possible nonce collisions (and corresponding log warning messages) | 1561 | * prevent possible nonce collisions (and corresponding log warning messages) |
1567 | * when clients' requests are intensive. | 1562 | * when clients' requests are intensive. |
@@ -4815,7 +4810,7 @@ struct MHD_DigestAuthInfo | |||
4815 | * The username string. | 4810 | * The username string. |
4816 | * Valid only if username is standard, extended, or userhash. | 4811 | * Valid only if username is standard, extended, or userhash. |
4817 | * For userhash this is unqoted string without decoding of the | 4812 | * For userhash this is unqoted string without decoding of the |
4818 | * hexadecimal digits (as provided by client). | 4813 | * hexadecimal digits (as provided by the client). |
4819 | * If extended notation is used, this string is pct-decoded string | 4814 | * If extended notation is used, this string is pct-decoded string |
4820 | * with charset and language tag removed (i.e. it is original username | 4815 | * with charset and language tag removed (i.e. it is original username |
4821 | * extracted from the extended notation). | 4816 | * extracted from the extended notation). |
@@ -4834,6 +4829,7 @@ struct MHD_DigestAuthInfo | |||
4834 | * Used only if username type is userhash, always NULL otherwise. | 4829 | * Used only if username type is userhash, always NULL otherwise. |
4835 | * When not NULL, this points to binary sequence @a username_len /2 bytes | 4830 | * When not NULL, this points to binary sequence @a username_len /2 bytes |
4836 | * long. | 4831 | * long. |
4832 | * The valid size should be #MHD_digest_get_hash_size(algo) bytes. | ||
4837 | * @warning This is binary data, no zero termination. | 4833 | * @warning This is binary data, no zero termination. |
4838 | * @warning To avoid buffer overruns, always check the size of the data before | 4834 | * @warning To avoid buffer overruns, always check the size of the data before |
4839 | * use, because @a userhash_bin can point even to zero-sized | 4835 | * use, because @a userhash_bin can point even to zero-sized |
@@ -4946,8 +4942,10 @@ struct MHD_DigestAuthUsernameInfo | |||
4946 | 4942 | ||
4947 | /** | 4943 | /** |
4948 | * The userhash decoded to binary form. | 4944 | * The userhash decoded to binary form. |
4945 | * Used only if username type is userhash, always NULL otherwise. | ||
4949 | * When not NULL, this points to binary sequence @a username_len /2 bytes | 4946 | * When not NULL, this points to binary sequence @a username_len /2 bytes |
4950 | * long. | 4947 | * long. |
4948 | * The valid size should be #MHD_digest_get_hash_size(algo) bytes. | ||
4951 | * @warning This is binary data, no zero termination. | 4949 | * @warning This is binary data, no zero termination. |
4952 | * @warning To avoid buffer overruns, always check the size of the data before | 4950 | * @warning To avoid buffer overruns, always check the size of the data before |
4953 | * use, because @a userhash_bin can point even to zero-sized | 4951 | * use, because @a userhash_bin can point even to zero-sized |
@@ -5251,6 +5249,12 @@ MHD_digest_auth_get_username (struct MHD_Connection *connection); | |||
5251 | 5249 | ||
5252 | 5250 | ||
5253 | /** | 5251 | /** |
5252 | * MHD digest auth internal code for an invalid nonce. | ||
5253 | */ | ||
5254 | #define MHD_INVALID_NONCE -1 | ||
5255 | |||
5256 | |||
5257 | /** | ||
5254 | * Which digest algorithm should MHD use for HTTP digest authentication? | 5258 | * Which digest algorithm should MHD use for HTTP digest authentication? |
5255 | * Used as parameter for #MHD_digest_auth_check2(), | 5259 | * Used as parameter for #MHD_digest_auth_check2(), |
5256 | * #MHD_digest_auth_check_digest2(), #MHD_queue_auth_fail_response2(). | 5260 | * #MHD_digest_auth_check_digest2(), #MHD_queue_auth_fail_response2(). |