summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-aggregation.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-04 20:29:18 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-04 20:29:18 +0100
commit6cceb617af887df49df74729bb1813bbd75a1346 (patch)
tree867616e235e6a1d84790f6c7c73f60900cbe2bb7 /src/auditor/taler-helper-auditor-aggregation.c
parent9b290fb26b2d18725858508bc14ae0933fff0250 (diff)
downloadexchange-6cceb617af887df49df74729bb1813bbd75a1346.tar.gz
exchange-6cceb617af887df49df74729bb1813bbd75a1346.tar.bz2
exchange-6cceb617af887df49df74729bb1813bbd75a1346.zip
centralize (most) offline signing/verifying operations into offline_signatures.c
Diffstat (limited to 'src/auditor/taler-helper-auditor-aggregation.c')
-rw-r--r--src/auditor/taler-helper-auditor-aggregation.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c
index e3e840e8e..f3f65ffb3 100644
--- a/src/auditor/taler-helper-auditor-aggregation.c
+++ b/src/auditor/taler-helper-auditor-aggregation.c
@@ -944,25 +944,15 @@ get_wire_fee (struct AggregationContext *ac,
easily make this one up, but it means that we have proof that the master
key was used for inconsistent wire fees if a merchant complains.) */
{
- struct TALER_MasterWireFeePS wf = {
- .purpose.purpose = htonl (TALER_SIGNATURE_MASTER_WIRE_FEES),
- .purpose.size = htonl (sizeof (wf)),
- .start_date = GNUNET_TIME_absolute_hton (wfi->start_date),
- .end_date = GNUNET_TIME_absolute_hton (wfi->end_date)
- };
-
- GNUNET_CRYPTO_hash (method,
- strlen (method) + 1,
- &wf.h_wire_method);
- TALER_amount_hton (&wf.wire_fee,
- &wfi->wire_fee);
- TALER_amount_hton (&wf.closing_fee,
- &wfi->closing_fee);
if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MASTER_WIRE_FEES,
- &wf,
- &master_sig.eddsa_signature,
- &TALER_ARL_master_pub.eddsa_pub))
+ TALER_exchange_offline_wire_fee_verify (
+ method,
+ wfi->start_date,
+ wfi->end_date,
+ &wfi->wire_fee,
+ &wfi->closing_fee,
+ &TALER_ARL_master_pub,
+ &master_sig))
{
report_row_inconsistency ("wire-fee",
timestamp.abs_value_us,