commit 93fb67305b989c3b16ff10372c72e7c2f7c2fff1
parent 9a18a1242524ca371d185ca0bfc17b47ab9a9b89
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 10 Jul 2025 21:03:43 +0200
expose h_details in transfer GET API
Diffstat:
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/include/taler/taler_exchange_service.h b/src/include/taler/taler_exchange_service.h
@@ -3227,6 +3227,11 @@ struct TALER_EXCHANGE_TransferData
*/
const struct TALER_TrackTransferDetails *details;
+ /**
+ * Hash over all of the @e details. For signature verification.
+ */
+ struct GNUNET_HashCode h_details;
+
};
diff --git a/src/lib/exchange_api_transfers_get.c b/src/lib/exchange_api_transfers_get.c
@@ -198,27 +198,22 @@ check_transfers_get_response_ok (
&detail->coin_fee);
}
/* Check signature */
+ GNUNET_CRYPTO_hash_context_finish (hash_context,
+ &td->h_details);
+ if (GNUNET_OK !=
+ TALER_exchange_online_wire_deposit_verify (
+ &td->total_amount,
+ &td->wire_fee,
+ &merchant_pub,
+ &td->h_payto,
+ &td->h_details,
+ &td->exchange_pub,
+ &td->exchange_sig))
{
- struct GNUNET_HashCode h_details;
-
- GNUNET_CRYPTO_hash_context_finish (hash_context,
- &h_details);
- if (GNUNET_OK !=
- TALER_exchange_online_wire_deposit_verify (
- &td->total_amount,
- &td->wire_fee,
- &merchant_pub,
- &td->h_payto,
- &h_details,
- &td->exchange_pub,
- &td->exchange_sig))
- {
- GNUNET_break_op (0);
- GNUNET_free (details);
- return GNUNET_SYSERR;
- }
+ GNUNET_break_op (0);
+ GNUNET_free (details);
+ return GNUNET_SYSERR;
}
-
if (0 >
TALER_amount_subtract (&total_expected,
&total_expected,