summaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_withdraw.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-07 10:55:07 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-07 10:55:07 +0100
commit031e365814edd8bde4e4216c83f435a6915a06ab (patch)
tree107790d605e434745fb016134135de13c5d43c0b /src/testing/testing_api_cmd_withdraw.c
parent2164c36f0fc9335d540a42db733131976b8d805d (diff)
downloadexchange-031e365814edd8bde4e4216c83f435a6915a06ab.tar.gz
exchange-031e365814edd8bde4e4216c83f435a6915a06ab.tar.bz2
exchange-031e365814edd8bde4e4216c83f435a6915a06ab.zip
fix FTBFS of main logic
Diffstat (limited to 'src/testing/testing_api_cmd_withdraw.c')
-rw-r--r--src/testing/testing_api_cmd_withdraw.c38
1 files changed, 29 insertions, 9 deletions
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index 7e2eecce9..306409155 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -100,6 +100,22 @@ struct WithdrawState
struct TALER_ReservePublicKeyP reserve_pub;
/**
+ * Private key of the coin.
+ */
+ struct TALER_CoinSpendPrivateKeyP coin_priv;
+
+ /**
+ * Blinding key used during the operation.
+ */
+ union TALER_DenominationBlindingKeyP bks;
+
+ /**
+ * Values contributed from the exchange during the
+ * withdraw protocol.
+ */
+ struct TALER_ExchangeWithdrawValues exchange_vals;
+
+ /**
* Interpreter state (during command).
*/
struct TALER_TESTING_Interpreter *is;
@@ -263,6 +279,9 @@ reserve_withdraw_cb (void *cls,
case MHD_HTTP_OK:
TALER_denom_sig_deep_copy (&ws->sig,
&wr->details.success.sig);
+ ws->coin_priv = wr->details.success.coin_priv;
+ ws->bks = wr->details.success.bks;
+ ws->exchange_vals = wr->details.success.exchange_vals;
if (0 != ws->total_backoff.rel_value_us)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -388,11 +407,11 @@ withdraw_run (void *cls,
&ws->reserve_pub);
if (NULL == ws->reuse_coin_key_ref)
{
- TALER_planchet_setup_coin_priv (&ws->ps.coin_priv);
+ TALER_planchet_setup_random (&ws->ps);
}
else
{
- const struct TALER_CoinSpendPrivateKeyP *coin_priv;
+ const struct TALER_PlanchetSecretsP *ps;
const struct TALER_TESTING_Command *cref;
char *cstr;
unsigned int index;
@@ -406,11 +425,9 @@ withdraw_run (void *cls,
GNUNET_assert (NULL != cref);
GNUNET_free (cstr);
GNUNET_assert (GNUNET_OK ==
- TALER_TESTING_get_trait_coin_priv (cref,
- index,
- &coin_priv));
- TALER_planchet_setup_coin_priv (&ws->ps.coin_priv);
- ws->ps.coin_priv = *coin_priv;
+ TALER_TESTING_get_trait_planchet_secret (cref,
+ &ps));
+ ws->ps = *ps;
}
if (NULL == ws->pk)
{
@@ -513,9 +530,12 @@ withdraw_traits (void *cls,
/* history entry MUST be first due to response code logic below! */
TALER_TESTING_make_trait_reserve_history (&ws->reserve_history),
TALER_TESTING_make_trait_coin_priv (0 /* only one coin */,
- &ws->ps.coin_priv),
+ &ws->coin_priv),
+ TALER_TESTING_make_trait_planchet_secret (&ws->ps),
TALER_TESTING_make_trait_blinding_key (0 /* only one coin */,
- &ws->ps.blinding_key),
+ &ws->bks),
+ TALER_TESTING_make_trait_exchange_wd_value (0 /* only one coin */,
+ &ws->exchange_vals),
TALER_TESTING_make_trait_denom_pub (0 /* only one coin */,
ws->pk),
TALER_TESTING_make_trait_denom_sig (0 /* only one coin */,