diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-24 20:13:16 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-09-25 18:40:50 +0300 |
commit | 172b0eeb45e771ca0df56697bcfb581cc8a96a88 (patch) | |
tree | 977a836a5046ee32eb1c957d923a3567ee61bdb9 /src/include/microhttpd.h | |
parent | 281b22da0e60e642a5ad528e5a25ff7ae9b2d7ed (diff) | |
download | libmicrohttpd-172b0eeb45e771ca0df56697bcfb581cc8a96a88.tar.gz libmicrohttpd-172b0eeb45e771ca0df56697bcfb581cc8a96a88.zip |
Implemented support for hash calculation by GnuTLS lib functions
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r-- | src/include/microhttpd.h | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index e5f0abac..5e744b69 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -96,7 +96,7 @@ extern "C" | |||
96 | * they are parsed as decimal numbers. | 96 | * they are parsed as decimal numbers. |
97 | * Example: 0x01093001 = 1.9.30-1. | 97 | * Example: 0x01093001 = 1.9.30-1. |
98 | */ | 98 | */ |
99 | #define MHD_VERSION 0x00097539 | 99 | #define MHD_VERSION 0x00097540 |
100 | 100 | ||
101 | /* If generic headers don't work on your platform, include headers | 101 | /* If generic headers don't work on your platform, include headers |
102 | which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t', | 102 | which define 'va_list', 'size_t', 'ssize_t', 'intptr_t', 'off_t', |
@@ -4691,8 +4691,10 @@ enum MHD_DigestAuthMultiAlgo3 | |||
4691 | * upon return | 4691 | * upon return |
4692 | * @param bin_buf_size the size of the @a userhash_bin buffer, must be | 4692 | * @param bin_buf_size the size of the @a userhash_bin buffer, must be |
4693 | * at least #MHD_digest_get_hash_size(algo3) bytes long | 4693 | * at least #MHD_digest_get_hash_size(algo3) bytes long |
4694 | * @return MHD_YES on success, MHD_NO if @a bin_buf_size is too small or | 4694 | * @return MHD_YES on success, |
4695 | * if @a algo3 algorithm is not supported. | 4695 | * MHD_NO if @a bin_buf_size is too small or if @a algo3 algorithm is |
4696 | * not supported (or external error has occurred, | ||
4697 | * see #MHD_FEATURE_EXTERN_HASH) | ||
4696 | * @note Available since #MHD_VERSION 0x00097535 | 4698 | * @note Available since #MHD_VERSION 0x00097535 |
4697 | * @ingroup authentication | 4699 | * @ingroup authentication |
4698 | */ | 4700 | */ |
@@ -4736,8 +4738,10 @@ MHD_digest_auth_calc_userhash (enum MHD_DigestAuthAlgo3 algo3, | |||
4736 | * userhash string | 4738 | * userhash string |
4737 | * @param bin_buf_size the size of the @a userhash_bin buffer, must be | 4739 | * @param bin_buf_size the size of the @a userhash_bin buffer, must be |
4738 | * at least #MHD_digest_get_hash_size(algo3)*2+1 chars long | 4740 | * at least #MHD_digest_get_hash_size(algo3)*2+1 chars long |
4739 | * @return MHD_YES on success, MHD_NO if @a bin_buf_size is too small or | 4741 | * @return MHD_YES on success, |
4740 | * if @a algo3 algorithm is not supported. | 4742 | * MHD_NO if @a bin_buf_size is too small or if @a algo3 algorithm is |
4743 | * not supported (or external error has occurred, | ||
4744 | * see #MHD_FEATURE_EXTERN_HASH). | ||
4741 | * @note Available since #MHD_VERSION 0x00097535 | 4745 | * @note Available since #MHD_VERSION 0x00097535 |
4742 | * @ingroup authentication | 4746 | * @ingroup authentication |
4743 | */ | 4747 | */ |
@@ -5287,8 +5291,10 @@ MHD_digest_auth_check3 (struct MHD_Connection *connection, | |||
5287 | * userdigest upon return | 5291 | * userdigest upon return |
5288 | * @param userdigest_bin the size of the @a userdigest_bin buffer, must be | 5292 | * @param userdigest_bin the size of the @a userdigest_bin buffer, must be |
5289 | * at least #MHD_digest_get_hash_size(algo3) bytes long | 5293 | * at least #MHD_digest_get_hash_size(algo3) bytes long |
5290 | * @return MHD_YES on success, MHD_NO if @a userdigest_bin is too small or | 5294 | * @return MHD_YES on success, |
5291 | * if @a algo3 algorithm is not supported. | 5295 | * MHD_NO if @a userdigest_bin is too small or if @a algo3 algorithm is |
5296 | * not supported (or external error has occurred, | ||
5297 | * see #MHD_FEATURE_EXTERN_HASH). | ||
5292 | * @sa #MHD_digest_auth_check_digest3() | 5298 | * @sa #MHD_digest_auth_check_digest3() |
5293 | * @note Available since #MHD_VERSION 0x00097535 | 5299 | * @note Available since #MHD_VERSION 0x00097535 |
5294 | * @ingroup authentication | 5300 | * @ingroup authentication |
@@ -5651,6 +5657,9 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection, | |||
5651 | int signal_stale); | 5657 | int signal_stale); |
5652 | 5658 | ||
5653 | 5659 | ||
5660 | /* ********************* Basic Authentication functions *************** */ | ||
5661 | |||
5662 | |||
5654 | /** | 5663 | /** |
5655 | * Information decoded from Basic Authentication client's header. | 5664 | * Information decoded from Basic Authentication client's header. |
5656 | * | 5665 | * |
@@ -6138,7 +6147,21 @@ enum MHD_FEATURE | |||
6138 | * module is built. | 6147 | * module is built. |
6139 | * @note Available since #MHD_VERSION 0x00097536 | 6148 | * @note Available since #MHD_VERSION 0x00097536 |
6140 | */ | 6149 | */ |
6141 | MHD_FEATURE_DIGEST_AUTH_USERHASH = 31 | 6150 | MHD_FEATURE_DIGEST_AUTH_USERHASH = 31, |
6151 | |||
6152 | /** | ||
6153 | * Get whether any of hashing algorithms is implemented by external | ||
6154 | * function (like TLS library) and may fail due to external conditions, | ||
6155 | * like "out-of-memory". | ||
6156 | * | ||
6157 | * If result is #MHD_YES then functions which use hash calculations | ||
6158 | * like #MHD_digest_auth_calc_userhash(), #MHD_digest_auth_check3() and others | ||
6159 | * potentially may fail even with valid input because of out-of-memory error | ||
6160 | * or crypto accelerator device failure, however in practice such fails are | ||
6161 | * unlikely. | ||
6162 | * @note Available since #MHD_VERSION 0x00097540 | ||
6163 | */ | ||
6164 | MHD_FEATURE_EXTERN_HASH = 32 | ||
6142 | }; | 6165 | }; |
6143 | 6166 | ||
6144 | 6167 | ||