[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 04/14: digestauth: simplified internal function call
From: |
gnunet |
Subject: |
[libmicrohttpd] 04/14: digestauth: simplified internal function call |
Date: |
Thu, 21 Jul 2022 14:08:02 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 984f72a2018269e2ddd3688e5c8c90eed6ef4142
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue Jul 19 19:45:58 2022 +0300
digestauth: simplified internal function call
---
src/microhttpd/digestauth.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 6d223e4a..d3a92740 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -360,15 +360,15 @@ digest_init (struct DigestAlgorithm *da)
*/
_MHD_static_inline void
digest_update (struct DigestAlgorithm *da,
- const uint8_t *data,
+ const void *data,
size_t length)
{
mhd_assert (da->inited);
mhd_assert (! da->digest_calculated);
if (MHD_DIGEST_BASE_ALGO_MD5 == da->algo)
- MHD_MD5Update (&da->ctx.md5_ctx, data, length);
+ MHD_MD5Update (&da->ctx.md5_ctx, (const uint8_t *) data, length);
else if (MHD_DIGEST_BASE_ALGO_SHA256 == da->algo)
- MHD_SHA256_update (&da->ctx.sha256_ctx, data, length);
+ MHD_SHA256_update (&da->ctx.sha256_ctx, (const uint8_t *) data, length);
else
mhd_assert (0); /* May not happen */
}
@@ -1313,26 +1313,26 @@ calculate_nonce (uint64_t nonce_time,
digest_update_with_colon (da);
if (rnd_size > 0)
digest_update (da,
- (const unsigned char *) rnd,
+ rnd,
rnd_size);
digest_update_with_colon (da);
digest_update (da,
- (const unsigned char *) uri,
+ uri,
uri_len);
for (h = first_header; NULL != h; h = h->next)
{
if (MHD_GET_ARGUMENT_KIND != h->kind)
continue;
- digest_update (da, (const uint8_t *) "\0", 2);
+ digest_update (da, "\0", 2);
if (0 != h->header_size)
- digest_update (da, (const uint8_t *) h->header, h->header_size);
- digest_update (da, (const uint8_t *) "", 1);
+ digest_update (da, h->header, h->header_size);
+ digest_update (da, "", 1);
if (0 != h->value_size)
- digest_update (da, (const uint8_t *) h->value, h->value_size);
+ digest_update (da, h->value, h->value_size);
}
digest_update_with_colon (da);
digest_update (da,
- (const unsigned char *) realm,
+ realm,
realm_len);
digest_calc_hash (da);
MHD_bin_to_hex (digest_get_bin (da),
@@ -2149,7 +2149,7 @@ digest_auth_check_all_inner (struct MHD_Connection
*connection,
if (_MHD_UNQ_OK != unq_res)
return MHD_DAUTH_ERROR;
- digest_update (da, (const uint8_t *) unq_copy.str, unq_copy.len);
+ digest_update (da, unq_copy.str, unq_copy.len);
/* The next check will modify copied URI string */
if (! check_uri_match (connection, unq_copy.str, unq_copy.len))
return MHD_DAUTH_WRONG_URI;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [libmicrohttpd] branch master updated (bd88a19e -> 22796735), gnunet, 2022/07/21
- [libmicrohttpd] 01/14: test_basicauth: Fixed doxy, gnunet, 2022/07/21
- [libmicrohttpd] 02/14: test_digest: improved test URI, gnunet, 2022/07/21
- [libmicrohttpd] 04/14: digestauth: simplified internal function call,
gnunet <=
- [libmicrohttpd] 03/14: digestauth: added small helper function to simplify the code, gnunet, 2022/07/21
- [libmicrohttpd] 06/14: digest_auth_check(): removed one more large local variable, gnunet, 2022/07/21
- [libmicrohttpd] 07/14: digest calculations: further simplified code, removed some local variables, gnunet, 2022/07/21
- [libmicrohttpd] 08/14: digestauth: removed usage of variable-length arrays, gnunet, 2022/07/21
- [libmicrohttpd] 11/14: digestauth: fixed username extraction with the new API, gnunet, 2022/07/21
- [libmicrohttpd] 10/14: digest_auth_check(): updated the order of parameters check, gnunet, 2022/07/21
- [libmicrohttpd] 12/14: digestauth: do not allocate extra space for extended notation, gnunet, 2022/07/21
- [libmicrohttpd] 05/14: digestauth: added sanity check for digest macros, gnunet, 2022/07/21
- [libmicrohttpd] 09/14: digest_auth_check(): added support for username in extended notation, gnunet, 2022/07/21
- [libmicrohttpd] 13/14: digestauth: added support for extended notation for old API, gnunet, 2022/07/21