diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-02-10 23:39:00 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-02-10 23:39:00 +0100 |
commit | 532d4ad0dca62055056e5b6093e82daa3541f690 (patch) | |
tree | 65e2d5b783d0a84b33779b8d0e89225d0e765353 /src/exchange/taler-exchange-httpd_refreshes_reveal.c | |
parent | d58d89dcab91823dff208d230e1b1b3a742810bd (diff) | |
download | exchange-532d4ad0dca62055056e5b6093e82daa3541f690.tar.gz exchange-532d4ad0dca62055056e5b6093e82daa3541f690.tar.bz2 exchange-532d4ad0dca62055056e5b6093e82daa3541f690.zip |
-fixes to tests, and half-baked fixes for CS-/link (still fails)
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refreshes_reveal.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_refreshes_reveal.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd_refreshes_reveal.c b/src/exchange/taler-exchange-httpd_refreshes_reveal.c index 568278144..e0d97bb3d 100644 --- a/src/exchange/taler-exchange-httpd_refreshes_reveal.c +++ b/src/exchange/taler-exchange-httpd_refreshes_reveal.c @@ -105,7 +105,10 @@ struct RevealContext /** * Array of information about fresh coins being revealed. */ - const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs; + /* FIXME: const would be nicer here, but we initalize + the 'alg_values' in the verification + routine; suboptimal to be fixed... */ + struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs; /** * Envelopes to be signed. @@ -141,7 +144,6 @@ check_commitment (struct RevealContext *rctx, struct MHD_Connection *connection, MHD_RESULT *mhd_ret) { - struct TALER_ExchangeWithdrawValues alg_values[rctx->num_fresh_coins]; struct TALER_CsNonce nonces[rctx->num_fresh_coins]; unsigned int aoff = 0; @@ -184,8 +186,10 @@ check_commitment (struct RevealContext *rctx, for (unsigned int j = 0; j<rctx->num_fresh_coins; j++) { const struct TALER_DenominationPublicKey *dk = &rctx->dks[j]->denom_pub; + struct TALER_ExchangeWithdrawValues *alg_values + = &rctx->rrcs[j].exchange_vals; - alg_values[j].cipher = dk->cipher; + alg_values->cipher = dk->cipher; switch (dk->cipher) { case TALER_DENOMINATION_INVALID: @@ -200,7 +204,7 @@ check_commitment (struct RevealContext *rctx, ec = TEH_keys_denomination_cs_r_pub ( &rctx->rrcs[j].h_denom_pub, &nonces[aoff], - &alg_values[j].details.cs_values.r_pub_pair); + &alg_values->details.cs_values.r_pub_pair); if (TALER_EC_NONE != ec) { *mhd_ret = TALER_MHD_reply_with_error (connection, @@ -251,12 +255,13 @@ check_commitment (struct RevealContext *rctx, aoff = 0; for (unsigned int j = 0; j<rctx->num_fresh_coins; j++) { - const struct TALER_DenominationPublicKey *dk = - &rctx->dks[j]->denom_pub; + 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; - const struct TALER_ExchangeWithdrawValues *alg_value = &alg_values[j]; + const struct TALER_ExchangeWithdrawValues *alg_value + = &rctx->rrcs[j].exchange_vals; struct TALER_PlanchetDetail pd; struct TALER_CoinPubHash c_hash; struct TALER_PlanchetSecretsP ps; |