aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/digestauth.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-06 22:21:57 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-06 22:21:57 +0300
commitcd5ad7aaadd8f169f79ba3564d49d7f2889093b8 (patch)
treed5e3899cce349d35a68db02c1be9252f53eb81a1 /src/microhttpd/digestauth.c
parentc658010707f6fc8a97b095584b55d842bc9faba9 (diff)
downloadlibmicrohttpd-cd5ad7aaadd8f169f79ba3564d49d7f2889093b8.tar.gz
libmicrohttpd-cd5ad7aaadd8f169f79ba3564d49d7f2889093b8.zip
digestauth: always use master daemon only
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r--src/microhttpd/digestauth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index a95455d3..a92d99ed 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -590,7 +590,7 @@ check_nonce_nc (struct MHD_Connection *connection,
590 size_t noncelen, 590 size_t noncelen,
591 uint64_t nc) 591 uint64_t nc)
592{ 592{
593 struct MHD_Daemon *daemon = connection->daemon; 593 struct MHD_Daemon *daemon = MHD_get_master (connection->daemon);
594 struct MHD_NonceNc *nn; 594 struct MHD_NonceNc *nn;
595 uint32_t mod; 595 uint32_t mod;
596 bool ret; 596 bool ret;
@@ -896,7 +896,7 @@ calculate_add_nonce (struct MHD_Connection *const connection,
896 struct DigestAlgorithm *da, 896 struct DigestAlgorithm *da,
897 char *nonce) 897 char *nonce)
898{ 898{
899 struct MHD_Daemon *const daemon = connection->daemon; 899 struct MHD_Daemon *const daemon = MHD_get_master (connection->daemon);
900 struct MHD_NonceNc *nn; 900 struct MHD_NonceNc *nn;
901 const size_t nonce_size = NONCE_STD_LEN (da->digest_size); 901 const size_t nonce_size = NONCE_STD_LEN (da->digest_size);
902 bool ret; 902 bool ret;
@@ -906,8 +906,8 @@ calculate_add_nonce (struct MHD_Connection *const connection,
906 906
907 calculate_nonce (timestamp, 907 calculate_nonce (timestamp,
908 connection->method, 908 connection->method,
909 connection->daemon->digest_auth_random, 909 daemon->digest_auth_random,
910 connection->daemon->digest_auth_rand_size, 910 daemon->digest_auth_rand_size,
911 connection->url, 911 connection->url,
912 realm, 912 realm,
913 da, 913 da,
@@ -969,7 +969,7 @@ calculate_add_nonce_with_retry (struct MHD_Connection *const connection,
969 const size_t digest_size = da->digest_size; 969 const size_t digest_size = da->digest_size;
970 char nonce2[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (digest_size)) + 1]; 970 char nonce2[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (digest_size)) + 1];
971 uint64_t timestamp2; 971 uint64_t timestamp2;
972 if (0 == connection->daemon->nonce_nc_size) 972 if (0 == MHD_get_master (connection->daemon)->nonce_nc_size)
973 return false; /* No need to re-try */ 973 return false; /* No need to re-try */
974 974
975 timestamp2 = MHD_monotonic_msec_counter (); 975 timestamp2 = MHD_monotonic_msec_counter ();
@@ -1142,7 +1142,7 @@ digest_auth_check_all (struct MHD_Connection *connection,
1142 const uint8_t *digest, 1142 const uint8_t *digest,
1143 unsigned int nonce_timeout) 1143 unsigned int nonce_timeout)
1144{ 1144{
1145 struct MHD_Daemon *daemon = connection->daemon; 1145 struct MHD_Daemon *daemon = MHD_get_master (connection->daemon);
1146 size_t len; 1146 size_t len;
1147 const char *header; 1147 const char *header;
1148 char nonce[MAX_NONCE_LENGTH]; 1148 char nonce[MAX_NONCE_LENGTH];
@@ -1655,7 +1655,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
1655 if (NULL == response) 1655 if (NULL == response)
1656 return MHD_NO; 1656 return MHD_NO;
1657 1657
1658 if (0 == connection->daemon->nonce_nc_size) 1658 if (0 == MHD_get_master (connection->daemon)->nonce_nc_size)
1659 { 1659 {
1660#ifdef HAVE_MESSAGES 1660#ifdef HAVE_MESSAGES
1661 MHD_DLOG (connection->daemon, 1661 MHD_DLOG (connection->daemon,