include execution time in signed message for /track/transfer (#4578)

This commit is contained in:
Christian Grothoff 2016-09-26 15:08:00 +02:00
parent df8c011b95
commit 77f11bcfac
3 changed files with 8 additions and 0 deletions

View File

@ -145,6 +145,7 @@ check_track_transfer_response_ok (struct TALER_EXCHANGE_TrackTransferHandle *wdh
} }
/* build up big hash for signature checking later */ /* build up big hash for signature checking later */
dd.h_contract = detail->h_contract; dd.h_contract = detail->h_contract;
dd.execution_time = GNUNET_TIME_absolute_hton (exec_time);
dd.transaction_id = GNUNET_htonll (detail->transaction_id); dd.transaction_id = GNUNET_htonll (detail->transaction_id);
dd.coin_pub = detail->coin_pub; dd.coin_pub = detail->coin_pub;
TALER_amount_hton (&dd.deposit_value, TALER_amount_hton (&dd.deposit_value,

View File

@ -1201,11 +1201,13 @@ TMH_RESPONSE_reply_track_transfer_details (struct MHD_Connection *connection,
struct TALER_ExchangePublicKeyP pub; struct TALER_ExchangePublicKeyP pub;
struct TALER_ExchangeSignatureP sig; struct TALER_ExchangeSignatureP sig;
GNUNET_TIME_round_abs (&exec_time);
deposits = json_array (); deposits = json_array ();
hash_context = GNUNET_CRYPTO_hash_context_start (); hash_context = GNUNET_CRYPTO_hash_context_start ();
for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next) for (wdd_pos = wdd_head; NULL != wdd_pos; wdd_pos = wdd_pos->next)
{ {
dd.h_contract = wdd_pos->h_contract; 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.transaction_id = GNUNET_htonll (wdd_pos->transaction_id);
dd.coin_pub = wdd_pos->coin_pub; dd.coin_pub = wdd_pos->coin_pub;
TALER_amount_hton (&dd.deposit_value, TALER_amount_hton (&dd.deposit_value,

View File

@ -959,6 +959,11 @@ struct TALER_WireDepositDetailP
*/ */
struct GNUNET_HashCode h_contract; 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. * Merchant's transaction ID in NBO.
*/ */