summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refreshes_reveal.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-09 19:17:50 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-09 19:17:50 +0100
commit8e4eaabc96fba004fac3295c9acd6272b723de07 (patch)
treeaa59f6ee64841f21921f6512c7c9274a515e1f05 /src/exchange/taler-exchange-httpd_refreshes_reveal.c
parent4ee82c1ed3e946c9e438fed678382f24bef2a856 (diff)
downloadexchange-8e4eaabc96fba004fac3295c9acd6272b723de07.tar.gz
exchange-8e4eaabc96fba004fac3295c9acd6272b723de07.tar.bz2
exchange-8e4eaabc96fba004fac3295c9acd6272b723de07.zip
-fix refresh commitment check for CS
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refreshes_reveal.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refreshes_reveal.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
index 1e09d2f29..646728ecd 100644
--- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c
+++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c
@@ -248,8 +248,11 @@ check_commitment (struct RevealContext *rctx,
&ts);
rce->new_coins = GNUNET_new_array (rctx->num_fresh_coins,
struct TALER_RefreshCoinData);
+ aoff = 0;
for (unsigned int j = 0; j<rctx->num_fresh_coins; j++)
{
+ const struct TALER_DenominationPublicKey *dk =
+ &rctx->dks[j]->denom_pub;
struct TALER_RefreshCoinData *rcd = &rce->new_coins[j];
struct TALER_CoinSpendPrivateKeyP coin_priv;
union TALER_DenominationBlindingKeyP bks;
@@ -275,6 +278,12 @@ check_commitment (struct RevealContext *rctx,
&coin_priv,
&c_hash,
&pd));
+ if (TALER_DENOMINATION_CS == dk->cipher)
+ {
+ pd.blinded_planchet.details.cs_blinded_planchet.nonce =
+ nonces[aoff];
+ aoff++;
+ }
rcd->blinded_planchet = pd.blinded_planchet;
}
}