summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_keystate.h
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2019-04-03 15:20:50 +0200
committerMarcello Stanisci <stanisci.m@gmail.com>2019-04-03 15:22:16 +0200
commit219f702926c61adedea9458e07a6936e76cfe13e (patch)
treec5bc1a952ac1cb024823921a6a52bb9db0399ccc /src/exchange/taler-exchange-httpd_keystate.h
parent41afe6fd675a6293a538d6523a46553650effc2a (diff)
downloadexchange-219f702926c61adedea9458e07a6936e76cfe13e.tar.gz
exchange-219f702926c61adedea9458e07a6936e76cfe13e.tar.bz2
exchange-219f702926c61adedea9458e07a6936e76cfe13e.zip
Faking the time.
Allow the user to pass a "now" value along the "/keys" request.
Diffstat (limited to 'src/exchange/taler-exchange-httpd_keystate.h')
-rw-r--r--src/exchange/taler-exchange-httpd_keystate.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_keystate.h b/src/exchange/taler-exchange-httpd_keystate.h
index 29e8cd50..62d69373 100644
--- a/src/exchange/taler-exchange-httpd_keystate.h
+++ b/src/exchange/taler-exchange-httpd_keystate.h
@@ -45,7 +45,8 @@ struct TEH_KS_StateHandle;
* @return the key state, NULL on error (usually pretty fatal)
*/
struct TEH_KS_StateHandle *
-TEH_KS_acquire_ (const char *location);
+TEH_KS_acquire_ (struct GNUNET_TIME_Absolute now,
+ const char *location);
/**
@@ -64,9 +65,11 @@ TEH_KS_release_ (const char *location,
* For every call to #TEH_KS_acquire(), a matching call
* to #TEH_KS_release() must be made.
*
+ * @param now current time snapshot; either true, or given by the
+ * client via the "now" URL parameter of "/keys".
* @return the key state
*/
-#define TEH_KS_acquire(void) TEH_KS_acquire_(__FUNCTION__)
+#define TEH_KS_acquire(now) TEH_KS_acquire_(now, __FUNCTION__)
/**