diff options
author | Lucien Heuzeveldt <lucienclaude.heuzeveldt@students.bfh.ch> | 2022-01-16 17:02:15 +0100 |
---|---|---|
committer | Gian Demarmels <gian@demarmels.org> | 2022-02-04 15:37:30 +0100 |
commit | 8d85c8b5b6c514ce093d856a2e4b931b4108ece5 (patch) | |
tree | 6ab878e42ad4a99337b7d42e7d89f358429165dd /src/testing | |
parent | ea97729ba891dc94ed2323aba01b15ca8e6a52d4 (diff) | |
download | exchange-8d85c8b5b6c514ce093d856a2e4b931b4108ece5.tar.xz |
implement feedback
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing_api_cmd_insert_deposit.c | 9 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_withdraw.c | 11 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c index eb1697d44..013c22932 100644 --- a/src/testing/testing_api_cmd_insert_deposit.c +++ b/src/testing/testing_api_cmd_insert_deposit.c @@ -202,21 +202,24 @@ insert_deposit_run (void *cls, struct TALER_PlanchetDetail pd; struct TALER_BlindedDenominationSignature bds; struct TALER_PlanchetSecretsP ps; + struct TALER_ExchangeWithdrawValues alg_values; - TALER_planchet_blinding_secret_create (&ps, TALER_DENOMINATION_RSA, NULL); + alg_values.cipher = TALER_DENOMINATION_RSA; + TALER_planchet_blinding_secret_create (&ps, + &alg_values); GNUNET_assert (GNUNET_OK == TALER_denom_blind (&dpk, &ps.blinding_key, NULL, /* FIXME-Oec */ &deposit.coin.coin_pub, - NULL, /* Not needed in RSA */ + &alg_values, &c_hash, &pd.blinded_planchet)); GNUNET_assert (GNUNET_OK == TALER_denom_sign_blinded (&bds, &denom_priv, &pd.blinded_planchet)); - GNUNET_free (pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg); + TALER_blinded_planchet_free (&pd.blinded_planchet); GNUNET_assert (GNUNET_OK == TALER_denom_sig_unblind (&deposit.coin.denom_sig, &bds, diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c index 2a98765f4..da514ddfa 100644 --- a/src/testing/testing_api_cmd_withdraw.c +++ b/src/testing/testing_api_cmd_withdraw.c @@ -121,6 +121,11 @@ struct WithdrawState struct TALER_PlanchetSecretsP ps; /** + * Withdraw Values used for planchet creation + */ + struct TALER_ExchangeWithdrawValues alg_values; + + /** * Reserve history entry that corresponds to this operation. * Will be of type #TALER_EXCHANGE_RTT_WITHDRAWAL. */ @@ -391,9 +396,10 @@ withdraw_run (void *cls, ws->reserve_payto_uri = TALER_payto_from_reserve (ws->exchange_url, &ws->reserve_pub); + ws->alg_values.cipher = ws->cipher; if (NULL == ws->reuse_coin_key_ref) { - TALER_planchet_setup_random (&ws->ps, ws->cipher); + TALER_planchet_setup_random (&ws->ps, &ws->alg_values); } else { @@ -414,7 +420,7 @@ withdraw_run (void *cls, TALER_TESTING_get_trait_coin_priv (cref, index, &coin_priv)); - TALER_planchet_setup_random (&ws->ps, ws->cipher); + TALER_planchet_setup_random (&ws->ps, &ws->alg_values); ws->ps.coin_priv = *coin_priv; } if (NULL == ws->pk) @@ -449,6 +455,7 @@ withdraw_run (void *cls, ws->pk, rp, &ws->ps, + &ws->alg_values, &reserve_withdraw_cb, ws); if (NULL == ws->wsh) |