summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-09-26 15:08:00 +0200
committerChristian Grothoff <christian@grothoff.org>2016-09-26 15:08:00 +0200
commit77f11bcfac8065816e8df06944acd91cd80b6ea9 (patch)
tree32a47c6e01bf6abc98d35343c80ae8c909ad614e /src
parentdf8c011b95cfaaf3040350f7b416c12f3771eb60 (diff)
downloadexchange-77f11bcfac8065816e8df06944acd91cd80b6ea9.tar.gz
exchange-77f11bcfac8065816e8df06944acd91cd80b6ea9.tar.bz2
exchange-77f11bcfac8065816e8df06944acd91cd80b6ea9.zip
include execution time in signed message for /track/transfer (#4578)
Diffstat (limited to 'src')
-rw-r--r--src/exchange-lib/exchange_api_track_transfer.c1
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c2
-rw-r--r--src/include/taler_signatures.h5
3 files changed, 8 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_track_transfer.c b/src/exchange-lib/exchange_api_track_transfer.c
index c37fbf5a..ffcb19b5 100644
--- a/src/exchange-lib/exchange_api_track_transfer.c
+++ b/src/exchange-lib/exchange_api_track_transfer.c
@@ -145,6 +145,7 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
}
/* build up big hash for signature checking later */
dd.h_contract = detail->h_contract;
+ dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
dd.transaction_id = GNUNET_htonll (detail->transaction_id);
dd.coin_pub = detail->coin_pub;
TALER_amount_hton (&dd.deposit_value,
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 47a709a6..8ad934e0 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -1201,11 +1201,13 @@ TMH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection,
struct TALER_ExchangePublicKeyP pub;
struct TALER_ExchangeSignatureP sig;
+ GNUNET_TIME_round_abs (&exec_time);
deposits = json_array ();
hash_context = GNUNET_CRYPTO_hash_context_start ();
for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next)
{
dd.h_contract = wdd_pos->h_contract;
+ dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
dd.transaction_id = GNUNET_htonll (wdd_pos->transaction_id);
dd.coin_pub = wdd_pos->coin_pub;
TALER_amount_hton (&dd.deposit_value,
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index a4d599cd..c294c73a 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -960,6 +960,11 @@ struct TALER_WireDepositDetailP
struct GNUNET_HashCode h_contract;
/**
+ * Time when the wire transfer was performed by the exchange.
+ */
+ struct GNUNET_TIME_AbsoluteNBO execution_time;
+
+ /**
* Merchant's transaction ID in NBO.
*/
uint64_t transaction_id GNUNET_PACKED;