summaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-coins.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-21 16:16:10 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-25 13:56:40 +0100
commit2c14d338704f4574055c4b5c51d8a79dd2e22345 (patch)
treeb90afcabc65e7f27b531098a8bf3ce48a5362593 /src/auditor/taler-helper-auditor-coins.c
parent1b23857f2cb56f4aa95a07d7c52bd48abc20b73b (diff)
downloadexchange-2c14d338704f4574055c4b5c51d8a79dd2e22345.tar.gz
exchange-2c14d338704f4574055c4b5c51d8a79dd2e22345.tar.bz2
exchange-2c14d338704f4574055c4b5c51d8a79dd2e22345.zip
deduplicate melt signing logic, remove coin_pub from data being signed over
Diffstat (limited to 'src/auditor/taler-helper-auditor-coins.c')
-rw-r--r--src/auditor/taler-helper-auditor-coins.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index 393fc464b..16d030b7f 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -1287,23 +1287,17 @@ refresh_session_cb (void *cls,
/* verify melt signature */
{
- struct TALER_RefreshMeltCoinAffirmationPS rmc = {
- .purpose.purpose = htonl (TALER_SIGNATURE_WALLET_COIN_MELT),
- .purpose.size = htonl (sizeof (rmc)),
- .rc = *rc,
- .melt_fee = issue->fee_refresh,
- .coin_pub = *coin_pub
- };
+ const struct TALER_DenominationHash h_denom_pub;
TALER_denom_pub_hash (denom_pub,
&rmc.h_denom_pub);
- TALER_amount_hton (&rmc.amount_with_fee,
- amount_with_fee);
if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_WALLET_COIN_MELT,
- &rmc,
- &coin_sig->eddsa_signature,
- &coin_pub->eddsa_pub))
+ TALER_wallet_melt_verify (&rmc.amount_with_fee,
+ &issue->fee_refresh,
+ rc,
+ &h_denom_pub,
+ coin_pub,
+ coin_sig))
{
TALER_ARL_report (report_bad_sig_losses,
GNUNET_JSON_PACK (