summaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_keystate.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-03-15 15:40:07 +0100
committerChristian Grothoff <christian@grothoff.org>2015-03-15 15:40:07 +0100
commitd0f2d8b42677b578e725cae999db7589fbe35e83 (patch)
treeece65f82b5aea0353e1f6deaed0d56f897eaeb65 /src/mint/taler-mint-httpd_keystate.h
parent6404213457fbb9ddd089d556d95d841e21754ff8 (diff)
downloadexchange-d0f2d8b42677b578e725cae999db7589fbe35e83.tar.gz
exchange-d0f2d8b42677b578e725cae999db7589fbe35e83.tar.bz2
exchange-d0f2d8b42677b578e725cae999db7589fbe35e83.zip
simplify code structure, reduce exposure of keystate struct
Diffstat (limited to 'src/mint/taler-mint-httpd_keystate.h')
-rw-r--r--src/mint/taler-mint-httpd_keystate.h61
1 files changed, 18 insertions, 43 deletions
diff --git a/src/mint/taler-mint-httpd_keystate.h b/src/mint/taler-mint-httpd_keystate.h
index 4b700d1c1..d72538a13 100644
--- a/src/mint/taler-mint-httpd_keystate.h
+++ b/src/mint/taler-mint-httpd_keystate.h
@@ -35,49 +35,7 @@
* Snapshot of the (coin and signing)
* keys (including private keys) of the mint.
*/
-struct MintKeyState
-{
- /**
- * When did we initiate the key reloading?
- */
- struct GNUNET_TIME_Absolute reload_time;
-
- /**
- * JSON array with denomination keys.
- */
- json_t *denom_keys_array;
-
- /**
- * JSON array with signing keys.
- */
- json_t *sign_keys_array;
-
- /**
- * Mapping from denomination keys to denomination key issue struct.
- */
- struct GNUNET_CONTAINER_MultiHashMap *denomkey_map;
-
- /**
- * When is the next key invalid and we have to reload?
- */
- struct GNUNET_TIME_Absolute next_reload;
-
- /**
- * Mint signing key that should be used currently.
- */
- struct TALER_MINT_SignKeyIssuePriv current_sign_key_issue;
-
- /**
- * Cached JSON text that the mint will send for
- * a /keys request.
- */
- char *keys_json;
-
- /**
- * Reference count.
- */
- unsigned int refcnt;
-};
+struct MintKeyState;
/**
@@ -135,5 +93,22 @@ TALER_MINT_keys_sign (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpose,
struct GNUNET_CRYPTO_EddsaSignature *sig);
+/**
+ * Handle a "/keys" request
+ *
+ * @param rh context of the handler
+ * @param connection the MHD connection to handle
+ * @param[IN|OUT] connection_cls the connection's closure (can be updated)
+ * @param upload_data upload data
+ * @param[IN|OUT] upload_data_size number of bytes (left) in @a upload_data
+ * @return MHD result code
+ */
+int
+TALER_MINT_handler_keys (struct RequestHandler *rh,
+ struct MHD_Connection *connection,
+ void **connection_cls,
+ const char *upload_data,
+ size_t *upload_data_size);
+
#endif