Commit Graph
794 Commits
Author SHA1 Message Date
Evgeny Grin (Karlson2k) 34059c3094 MHD_digest_auth_check3(): return failed parameter if it is known 2022-07-30 22:28:45 +03:00
Evgeny Grin (Karlson2k) 51bea81bf7 microhttpd.h: sorted Digest Auth functions and enums
This should improve readability of the header.
2022-07-30 22:28:44 +03:00
Evgeny Grin (Karlson2k) fff9fa7832 digestauth: implemented support for RFC 2069
The old Digest Auth specification, but still supported by many clients.
2022-07-30 22:28:44 +03:00
Evgeny Grin (Karlson2k) 0ecad853ed Added new MHD_OPTION_DIGEST_AUTH_RANDOM_COPY option 2022-07-30 22:28:43 +03:00
Evgeny Grin (Karlson2k) 653376caa5 microhttpd: improved description for MHD_OPTION_DIGEST_AUTH_RANDOM 2022-07-30 22:28:43 +03:00
Evgeny Grin (Karlson2k) c3b626ed22 microhttpd: improved description for MHD_OPTION_NONCE_NC_SIZE 2022-07-30 22:28:42 +03:00
Evgeny Grin (Karlson2k) 5aa16f7e31 digestauth: added dynamic detection and use of the algo specified by client 2022-07-30 22:28:41 +03:00
Evgeny Grin (Karlson2k) a64c96c497 MHD_FEATURE_*: added some values related to Digest Auth 2022-07-28 07:21:37 +03:00
Evgeny Grin (Karlson2k) c03c57c9d2 Added MHD_queue_auth_required_response3(); Refactored public Digest Auth API v3
Added brand new function with more complete support for RFC 7616
features. New function implemented from scratch. Old functions became
wrappers for the new function, so fixes are inherited.

Fixes:
* All user values are properly quoted
Features:
* Added support for optional 'domain' Digest auth parameter
* Realm now optional
* Added userhash support
* Added charset support

For other Digest Auth v3 functions:
* Added more parameters for complete control of Auth process from
  application side.
2022-07-28 07:21:35 +03:00
Evgeny Grin (Karlson2k) 4baec145d4 Digest Auth public structs: removed redundant member
Added one more check for data validity.
2022-07-28 07:21:33 +03:00
Evgeny Grin (Karlson2k) 012a2d3bb1 Updated Digest Auth enums in the header 2022-07-28 07:21:33 +03:00
Evgeny Grin (Karlson2k) 5866b68fa7 Updated doxy for old Digest Auth API function
This function supports new functionality now (extended notation) and
this functionality is automatically available without rebuilding
application.
2022-07-25 16:20:49 +03:00
Christian Grothoff bd88a19e2d -typo 2022-07-20 21:04:25 +02:00
Evgeny Grin (Karlson2k) 76b5b1952c microhttpd.h: formatted some deprecation warnings 2022-07-19 17:50:07 +03:00
Evgeny Grin (Karlson2k) d39ad79ab6 digest_auth_check(): check and report wrong algorithm 2022-07-19 17:50:07 +03:00
Evgeny Grin (Karlson2k) f826bbca44 microhttpd.h: added special enum for hash types 2022-07-19 17:50:06 +03:00
Evgeny Grin (Karlson2k) 98b3c68aab Added new functions MHD_digest_auth_get_request_info3() and MHD_digest_auth_get_username3() 2022-07-19 17:50:05 +03:00
Evgeny Grin (Karlson2k) 93a449edfb Use new functions for decode request URLs 2022-07-19 17:50:04 +03:00
Christian Grothoff d629ada1a2 -fix typos 2022-06-26 15:24:24 +02:00
Evgeny Grin (Karlson2k) a5af7f7379 digest_auth_check_all(): simplified, improved readability
Added check for too long nonce (the size is know in advance, no need to
try other check if nonce size is wrong);
Used caseless match more 'qop' value (as required by RFC), too long
'qop' values reject early, added special result value for wrong qop;
Reject early with too long 'nc' value;
Reject early with wrong response size (the size is know in advance, no
need to make CPU-intensive hash calculations if size if incorrect);
Added special return value is any parameter is too large to be processed
2022-06-22 20:58:43 +03:00
Evgeny Grin (Karlson2k) bb0addb587 microhttpd.h: cosmetics and doxy minor improvements 2022-06-13 12:12:55 +03:00
Evgeny Grin (Karlson2k) 846196300f MHD_free(): updated doxy 2022-06-10 11:17:12 +03:00
Evgeny Grin (Karlson2k) 483d47c90e Basic Auth: switched to the internal Base64 decoding implementation
Internal implementation able to detect all kind of problems with broken
base64 encoding and more secure.
2022-06-09 16:56:06 +03:00
Evgeny Grin (Karlson2k) 929e046215 MHD_basic_auth_get_username_password3(): added new public API function 2022-06-08 16:52:50 +03:00
Evgeny Grin (Karlson2k) 72e6f27fce MHD_queue_basic_auth_fail_response3(): new function for RFC 7617 support 2022-06-08 16:52:48 +03:00
Evgeny Grin (Karlson2k) 6ab9cb0c8a Muted compiler warnings for W32 non-TLS build of the lib 2022-06-02 17:28:39 +03:00
Evgeny Grin (Karlson2k) 73340d1daf microhttpd.h: fixed doxy 2022-06-01 22:12:37 +03:00
Evgeny Grin (Karlson2k) 92bfeb762e MHD_get_timeout*(): improved doxy 2022-05-31 20:19:13 +03:00
Evgeny Grin (Karlson2k) 9039d65241 authentication: reworked header parsing
Added single function to parse all enabled authentication schemes header
strings.
The parsing result is cached and reused thus avoiding repetitive header
parsing.
The new function correctly "unquotes" values (backslashes are removed)
as required by RFC.
2022-05-31 11:45:36 +03:00
Evgeny Grin (Karlson2k) 2ec6b3c7c9 Use '#ifdef PARAM' instead of '#if PARAM' for configuration options 2022-05-16 19:46:30 +03:00
Evgeny Grin (Karlson2k) 7899565cef Made cookie parsing optional feature 2022-05-15 21:02:48 +03:00
Evgeny Grin (Karlson2k) 4fc1bbfd5b MHD_create_response_from_buffer_copy(): fixed doxy 2022-05-14 14:52:07 +03:00
Evgeny Grin (Karlson2k) a13647d1d0 Replaced MHD_RESPMEM_MUST_FREE with more portable solution in examples 2022-05-14 14:37:02 +03:00
Evgeny Grin (Karlson2k) 547246b9cb Added two new public functions for digest authentication 2022-05-13 17:20:21 +03:00
Evgeny Grin (Karlson2k) 5fdb9effcb digestauth: added detection for possibly fabricated nonces 2022-05-13 15:18:49 +03:00
Evgeny Grin (Karlson2k) 58d1aef753 digestauth: fixed wrong results of client data check
Stale 'nonce' from client was reported as either 'INVALID_NONCE' or just
as 'MHD_NO'. Now it is always reported as 'INVALID_NONCE".

Unfortunately wrong 'nonce' is reported as 'INVALID_NONCE' as well and
it cannot be fixed with current API.
2022-05-13 15:18:48 +03:00
Evgeny Grin (Karlson2k) f84c4d60a4 microhttpd.h: fixed list of required types 2022-05-01 14:30:10 +03:00
Evgeny Grin (Karlson2k) c6eae238be Added new function MHD_get_timeout_i()
This function is useful for direct in in poll() or epoll_wait().
2022-04-28 19:06:46 +03:00
Evgeny Grin (Karlson2k) d14fc3b3d7 MHD_get_timeout*(): improved doxy 2022-04-27 22:24:23 +03:00
Evgeny Grin (Karlson2k) 860aa4e0ed Added new function MHD_get_timeout64s() 2022-04-27 22:11:55 +03:00
Evgeny Grin (Karlson2k) 7ad7452c19 Added new function MHD_get_timeout64()
The same functionally as MHD_get_timeout(), but with standard type uint64_t
2022-04-27 22:11:55 +03:00
Evgeny Grin (Karlson2k) efdd6e0ffb MHD_set_panic_func: clarified doxy 2022-04-25 22:50:47 +03:00
Evgeny Grin (Karlson2k) 2d36741148 MHD_get_daemon_info(): fixed unaligned memory access 2022-04-25 16:05:15 +03:00
Evgeny Grin (Karlson2k) 314917828a MHD_get_connection_info(): Fixed possible unaligned access
Also:
* Reduced number of 'MHD_Connection' members.
* Fixed wrong value of returned timeout on some platforms, if timeout
is too large.
2022-04-25 16:05:12 +03:00
Evgeny Grin (Karlson2k) 763db7922a microhttpd2.h: fixed code style 2022-04-23 15:21:20 +03:00
Evgeny Grin (Karlson2k) 8c87442ffc Fixed many macros
'defined()' should be used without space before bracket
2022-04-23 15:21:20 +03:00
Evgeny Grin (Karlson2k) 33b4a2d997 autoinit_funcs.h: improved formatting 2022-04-23 15:21:19 +03:00
Evgeny Grin (Karlson2k) f80da0ba6f autoinit_funcs.h: added functions prototypes 2022-04-23 15:21:18 +03:00
Evgeny Grin (Karlson2k) 81daa705ca microhttpd.h: minor doxy improvement 2022-04-19 20:27:36 +03:00
Evgeny Grin (Karlson2k) 43cca25d44 Added new API function MHD_create_response_from_buffer_copy() 2022-04-19 20:27:36 +03:00