diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-09 19:17:50 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-09 19:17:50 +0100 |
commit | 8e4eaabc96fba004fac3295c9acd6272b723de07 (patch) | |
tree | aa59f6ee64841f21921f6512c7c9274a515e1f05 | |
parent | 4ee82c1ed3e946c9e438fed678382f24bef2a856 (diff) |
-fix refresh commitment check for CS
-rw-r--r-- | src/exchange/taler-exchange-httpd_refreshes_reveal.c | 9 | ||||
-rw-r--r-- | src/util/crypto.c | 5 |
2 files changed, 9 insertions, 5 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; } } diff --git a/src/util/crypto.c b/src/util/crypto.c index 614b008c5..5a7dbfeee 100644 --- a/src/util/crypto.c +++ b/src/util/crypto.c @@ -476,11 +476,6 @@ TALER_refresh_get_commitment (struct TALER_RefreshCommitmentP *rc, { const struct TALER_RefreshCoinData *rcd = &rce->new_coins[j]; - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "BCH %u/%u %s\n", - i, j, - TALER_B2S ( - &rcd->blinded_planchet.details.cs_blinded_planchet)); TALER_blinded_planchet_hash (&rcd->blinded_planchet, hash_context); } |