aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_keystate.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-27 20:32:30 +0200
committerChristian Grothoff <christian@grothoff.org>2015-09-27 20:32:30 +0200
commitbf8b9d1435a196c9b7c3293904da2a3baba7210a (patch)
treeb722367def8d35bff70938db77323de61efd0348 /src/mint/taler-mint-httpd_keystate.h
parenta67fefa9fbcf9774d277a9c94aeebdf78d2051d1 (diff)
parent1bfba318ec0f3393de2dfc66821dec6165eef90a (diff)
mention need to audit randomness of gamma
Diffstat (limited to 'src/mint/taler-mint-httpd_keystate.h')
-rw-r--r--src/mint/taler-mint-httpd_keystate.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/mint/taler-mint-httpd_keystate.h b/src/mint/taler-mint-httpd_keystate.h
index 62b041e9..0e20ef58 100644
--- a/src/mint/taler-mint-httpd_keystate.h
+++ b/src/mint/taler-mint-httpd_keystate.h
@@ -41,19 +41,40 @@ struct TMH_KS_StateHandle;
* For every call to #TMH_KS_acquire(), a matching call
* to #TMH_KS_release() must be made.
*
+ * @param location name of the function in which the lock is acquired
* @return the key state
*/
struct TMH_KS_StateHandle *
-TMH_KS_acquire (void);
+TMH_KS_acquire_ (const char *location);
/**
* Release key state, free if necessary (if reference count gets to zero).
*
+ * @param location name of the function in which the lock is acquired
* @param key_state the key state to release
*/
void
-TMH_KS_release (struct TMH_KS_StateHandle *key_state);
+TMH_KS_release_ (const char *location,
+ struct TMH_KS_StateHandle *key_state);
+
+
+/**
+ * Acquire the key state of the mint. Updates keys if necessary.
+ * For every call to #TMH_KS_acquire(), a matching call
+ * to #TMH_KS_release() must be made.
+ *
+ * @return the key state
+ */
+#define TMH_KS_acquire(void) TMH_KS_acquire_(__FUNCTION__)
+
+
+/**
+ * Release key state, free if necessary (if reference count gets to zero).
+ *
+ * @param key_state the key state to release
+ */
+#define TMH_KS_release(key_state) TMH_KS_release_ (__FUNCTION__, key_state)
/**
@@ -65,7 +86,7 @@ TMH_KS_release (struct TMH_KS_StateHandle *key_state);
enum TMH_KS_DenominationKeyUse {
/**
- * The key is to be used for a /withdraw/sign or /refresh (mint)
+ * The key is to be used for a /reserve/withdraw or /refresh (mint)
* operation.
*/
TMH_KS_DKU_WITHDRAW,