summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_recoup-refresh.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-14 23:02:25 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-14 23:02:25 +0100
commitbd77bcb52dcad4b761f3db0acaa6b71b112a31c2 (patch)
treef519ebc30bf0917d9f2e91667a20beac71284586 /src/exchange/taler-exchange-httpd_recoup-refresh.c
parentf4f40a31efd3028dec36c0b84a49617926b5f9c3 (diff)
downloadexchange-bd77bcb52dcad4b761f3db0acaa6b71b112a31c2.tar.gz
exchange-bd77bcb52dcad4b761f3db0acaa6b71b112a31c2.tar.bz2
exchange-bd77bcb52dcad4b761f3db0acaa6b71b112a31c2.zip
-towards fixing the protocol
Diffstat (limited to 'src/exchange/taler-exchange-httpd_recoup-refresh.c')
-rw-r--r--src/exchange/taler-exchange-httpd_recoup-refresh.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_recoup-refresh.c b/src/exchange/taler-exchange-httpd_recoup-refresh.c
index 3e0588940..829e2cbd7 100644
--- a/src/exchange/taler-exchange-httpd_recoup-refresh.c
+++ b/src/exchange/taler-exchange-httpd_recoup-refresh.c
@@ -174,6 +174,7 @@ verify_and_execute_recoup_refresh (
const struct TALER_CoinPublicInfo *coin,
const struct TALER_ExchangeWithdrawValues *exchange_vals,
const union TALER_DenominationBlindingKeyP *coin_bks,
+ const struct TALER_CsNonce *nonce,
const struct TALER_CoinSpendSignatureP *coin_sig)
{
struct RecoupContext pc;
@@ -263,6 +264,9 @@ verify_and_execute_recoup_refresh (
TALER_EC_EXCHANGE_RECOUP_REFRESH_BLINDING_FAILED,
NULL);
}
+ if (TALER_DENOMINATION_CS == blinded_planchet.cipher)
+ blinded_planchet.details.cs_blinded_planchet.nonce
+ = *nonce;
TALER_coin_ev_hash (&blinded_planchet,
&coin->denom_pub_hash,
&h_blind);
@@ -360,6 +364,7 @@ TEH_handler_recoup_refresh (struct MHD_Connection *connection,
union TALER_DenominationBlindingKeyP coin_bks;
struct TALER_CoinSpendSignatureP coin_sig;
struct TALER_ExchangeWithdrawValues exchange_vals;
+ struct TALER_CsNonce nonce;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("denom_pub_hash",
&coin.denom_pub_hash),
@@ -371,12 +376,18 @@ TEH_handler_recoup_refresh (struct MHD_Connection *connection,
&coin_bks),
GNUNET_JSON_spec_fixed_auto ("coin_sig",
&coin_sig),
+ GNUNET_JSON_spec_mark_optional (
+ GNUNET_JSON_spec_fixed_auto ("cs_nonce",
+ &nonce)),
GNUNET_JSON_spec_end ()
};
memset (&coin,
0,
sizeof (coin));
+ memset (&nonce,
+ 0,
+ sizeof (nonce));
coin.coin_pub = *coin_pub;
ret = TALER_MHD_parse_json_data (connection,
root,
@@ -392,6 +403,7 @@ TEH_handler_recoup_refresh (struct MHD_Connection *connection,
&coin,
&exchange_vals,
&coin_bks,
+ &nonce,
&coin_sig);
GNUNET_JSON_parse_free (spec);
return res;