aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorGian Demarmels <gian@demarmels.org>2022-01-11 21:21:18 +0100
committerGian Demarmels <gian@demarmels.org>2022-02-04 15:36:11 +0100
commit5b7e8f9ac55990823363edffa0e907256d15ce4f (patch)
tree7c0b265ea23c46a40e131ea3eea16090688b0a0c /src/lib
parentdaa7fdcfb1053bdd943ad7cd1bd8eb623d1c9157 (diff)
downloadexchange-5b7e8f9ac55990823363edffa0e907256d15ce4f.tar.xz
refactoring
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_link.c1
-rw-r--r--src/lib/exchange_api_refresh_common.c1
-rw-r--r--src/lib/exchange_api_refreshes_reveal.c2
-rw-r--r--src/lib/exchange_api_withdraw.c14
4 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/exchange_api_link.c b/src/lib/exchange_api_link.c
index 87bb5dc94..f2ef26d1a 100644
--- a/src/lib/exchange_api_link.c
+++ b/src/lib/exchange_api_link.c
@@ -144,6 +144,7 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
&old_coin_pub.eddsa_pub);
if (GNUNET_OK !=
TALER_planchet_prepare (&rpub,
+ NULL, /* not needed in RSA*/
&fc,
&c_hash,
&pd))
diff --git a/src/lib/exchange_api_refresh_common.c b/src/lib/exchange_api_refresh_common.c
index fa3e63fef..171b9adb1 100644
--- a/src/lib/exchange_api_refresh_common.c
+++ b/src/lib/exchange_api_refresh_common.c
@@ -432,6 +432,7 @@ TALER_EXCHANGE_refresh_prepare (
fc);
if (GNUNET_OK !=
TALER_planchet_prepare (&md.fresh_pks[j],
+ NULL, /* not needed in RSA*/
fc,
&c_hash,
&pd))
diff --git a/src/lib/exchange_api_refreshes_reveal.c b/src/lib/exchange_api_refreshes_reveal.c
index 6fc3f1a3f..42e0cc328 100644
--- a/src/lib/exchange_api_refreshes_reveal.c
+++ b/src/lib/exchange_api_refreshes_reveal.c
@@ -175,6 +175,7 @@ refresh_reveal_ok (struct TALER_EXCHANGE_RefreshesRevealHandle *rrh,
&blind_sig,
fc,
&coin_hash,
+ NULL, /* Not needed in RSA case */
&coin))
{
GNUNET_break_op (0);
@@ -358,6 +359,7 @@ TALER_EXCHANGE_refreshes_reveal (
if (GNUNET_OK !=
TALER_planchet_prepare (&md->fresh_pks[i],
+ NULL, /* not needed in RSA*/
&md->fresh_coins[noreveal_index][i],
&c_hash,
&pd))
diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c
index e42107ab9..5102b35a3 100644
--- a/src/lib/exchange_api_withdraw.c
+++ b/src/lib/exchange_api_withdraw.c
@@ -74,6 +74,11 @@ struct TALER_EXCHANGE_WithdrawHandle
struct TALER_PlanchetDetail pd;
/**
+ * Values of the @cipher selected
+ */
+ struct TALER_ExchangeWithdrawValues alg_values;
+
+ /**
* Denomination key we are withdrawing.
*/
struct TALER_EXCHANGE_DenomPublicKey pk;
@@ -122,6 +127,7 @@ handle_reserve_withdraw_finished (
blind_sig,
&wh->ps,
&wh->c_hash,
+ &wh->alg_values,
&fc))
{
wr.hr.http_status = 0;
@@ -180,11 +186,14 @@ withdraw_cs_stage_two_callback (void *cls,
switch (csrr->hr.http_status)
{
case MHD_HTTP_OK:
- wh->ps.cs_r_pub = csrr->details.success.r_pubs;
+ wh->alg_values.cipher = TALER_DENOMINATION_CS;
+ wh->alg_values.details.cs_values.r_pub = csrr->details.success.r_pubs;
TALER_planchet_blinding_secret_create (&wh->ps,
- wh->pk.key.cipher);
+ wh->pk.key.cipher,
+ &wh->alg_values);
if (GNUNET_OK !=
TALER_planchet_prepare (&wh->pk.key,
+ &wh->alg_values,
&wh->ps,
&wh->c_hash,
&wh->pd))
@@ -256,6 +265,7 @@ TALER_EXCHANGE_withdraw (
case TALER_DENOMINATION_RSA:
if (GNUNET_OK !=
TALER_planchet_prepare (&pk->key,
+ NULL, /* not needed in RSA*/
ps,
&wh->c_hash,
&wh->pd))