summaryrefslogtreecommitdiff
path: root/src/exchangedb
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-02-14 13:41:46 +0100
committerChristian Grothoff <christian@grothoff.org>2019-02-14 13:41:46 +0100
commite56ed85f4f11f3daec80326f7d43635281b3806b (patch)
tree33d9b9523a6e1a38e4ee0264927f9e89892a4af8 /src/exchangedb
parent9ff3c2fce5835dff2100a80f27b7f620aaa50783 (diff)
downloadexchange-e56ed85f4f11f3daec80326f7d43635281b3806b.tar.gz
exchange-e56ed85f4f11f3daec80326f7d43635281b3806b.tar.bz2
exchange-e56ed85f4f11f3daec80326f7d43635281b3806b.zip
preparations for #5536
Diffstat (limited to 'src/exchangedb')
-rw-r--r--src/exchangedb/exchangedb_denomkeys.c6
-rw-r--r--src/exchangedb/exchangedb_signkeys.c6
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c26
3 files changed, 38 insertions, 0 deletions
diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c
index 5ff3b5c51..d23f8f2f0 100644
--- a/src/exchangedb/exchangedb_denomkeys.c
+++ b/src/exchangedb/exchangedb_denomkeys.c
@@ -151,6 +151,12 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
data,
offset);
GNUNET_free (data);
+ if (0 == GNUNET_TIME_absolute_get_remaining
+ (GNUNET_TIME_absolute_ntoh (dki->issue.properties.expire_withdraw)).rel_value_us)
+ {
+ /* FIXME: #5536: we should delete this file, the
+ private key is no longer needed (and return SYSERR!) */
+ }
return GNUNET_OK;
}
diff --git a/src/exchangedb/exchangedb_signkeys.c b/src/exchangedb/exchangedb_signkeys.c
index 866bf4d3d..3c9f1630a 100644
--- a/src/exchangedb/exchangedb_signkeys.c
+++ b/src/exchangedb/exchangedb_signkeys.c
@@ -73,6 +73,12 @@ signkeys_iterate_dir_iter (void *cls,
(unsigned int) sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP));
return GNUNET_OK;
}
+ if (0 == GNUNET_TIME_absolute_get_remaining
+ (GNUNET_TIME_absolute_ntoh (issue.issue.expire)).rel_value_us)
+ {
+ /* FIXME: #5536: we should delete this file, the
+ private key is no longer needed (and return SYSERR!) */
+ }
return skc->it (skc->it_cls,
filename,
&issue);
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 2ce865ae3..c399aeeb5 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1981,6 +1981,31 @@ postgres_get_denomination_info (void *cls,
/**
+ * Fetch information about all known denomination keys.
+ *
+ * @param cls the @e cls of this struct with the plugin-specific state
+ * @param cb function to call on each denomination key
+ * @param cb_cls closure for @a cb
+ * @return transaction status code
+ */
+static enum GNUNET_DB_QueryStatus
+postgres_iterate_denomination_info (void *cls,
+ TALER_EXCHANGEDB_DenominationInfoIterator cb,
+ void *cb_cls)
+{
+#if 0
+ enum GNUNET_DB_QueryStatus qs;
+ struct GNUNET_PQ_QueryParam params[] = {
+ GNUNET_PQ_query_param_end
+ };
+#endif
+
+ GNUNET_break (0); // not implemented! #5536
+ return GNUNET_DB_STATUS_HARD_ERROR;
+}
+
+
+/**
* Get the summary of a reserve.
*
* @param cls the `struct PostgresClosure` with the plugin-specific state
@@ -7099,6 +7124,7 @@ libtaler_plugin_exchangedb_postgres_init (void *cls)
plugin->rollback = &postgres_rollback;
plugin->insert_denomination_info = &postgres_insert_denomination_info;
plugin->get_denomination_info = &postgres_get_denomination_info;
+ plugin->iterate_denomination_info = &postgres_iterate_denomination_info;
plugin->reserve_get = &postgres_reserve_get;
plugin->reserves_in_insert = &postgres_reserves_in_insert;
plugin->get_latest_reserve_in_reference = &postgres_get_latest_reserve_in_reference;