From 70f7ad46ebc58f18599be8356751edda162ff435 Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 27 Aug 2015 09:43:09 +0000 Subject: Reimplement monotonic clock with wide range of platforms support --- src/microhttpd/digestauth.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/microhttpd/digestauth.c') diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c index e69f58aa..32ef79ef 100644 --- a/src/microhttpd/digestauth.c +++ b/src/microhttpd/digestauth.c @@ -26,6 +26,7 @@ #include #include "internal.h" #include "md5.h" +#include "mhd_mono_clock.h" #if defined(_WIN32) && defined(MHD_W32_MUTEX_) #ifndef WIN32_LEAN_AND_MEAN @@ -643,7 +644,7 @@ MHD_digest_auth_check (struct MHD_Connection *connection, } /* 8 = 4 hexadecimal numbers for the timestamp */ nonce_time = strtoul (nonce + len - 8, (char **)NULL, 16); - t = (uint32_t) MHD_monotonic_time(); + t = (uint32_t) MHD_monotonic_sec_counter(); /* * First level vetting for the nonce validity: if the timestamp * attached to the nonce exceeds `nonce_timeout', then the nonce is @@ -820,7 +821,7 @@ MHD_queue_auth_fail_response (struct MHD_Connection *connection, char nonce[HASH_MD5_HEX_LEN + 9]; /* Generating the server nonce */ - calculate_nonce ((uint32_t) MHD_monotonic_time(), + calculate_nonce ((uint32_t) MHD_monotonic_sec_counter(), connection->method, connection->daemon->digest_auth_random, connection->daemon->digest_auth_rand_size, -- cgit v1.2.3