aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_link.c11
-rw-r--r--src/lib/exchange_api_refresh_common.c6
-rw-r--r--src/lib/exchange_api_refreshes_reveal.c17
-rw-r--r--src/lib/exchange_api_withdraw.c2
-rw-r--r--src/lib/exchange_api_withdraw2.c14
5 files changed, 34 insertions, 16 deletions
diff --git a/src/lib/exchange_api_link.c b/src/lib/exchange_api_link.c
index ec085b533..87bb5dc94 100644
--- a/src/lib/exchange_api_link.c
+++ b/src/lib/exchange_api_link.c
@@ -155,20 +155,25 @@ parse_link_coin (const struct TALER_EXCHANGE_LinkHandle *lh,
GNUNET_CRYPTO_hash (pd.coin_ev,
pd.coin_ev_size,
&coin_envelope_hash.hash);
-
+ //FIXME:
if (GNUNET_OK !=
TALER_wallet_link_verify (&pd.denom_pub_hash,
trans_pub,
&coin_envelope_hash,
+ pd.blinded_planchet.details.
+ rsa_blinded_planchet.blinded_msg,
+ pd.blinded_planchet.details.
+ rsa_blinded_planchet.blinded_msg_size,
&old_coin_pub,
&link_sig))
{
GNUNET_break_op (0);
- GNUNET_free (pd.coin_ev);
+ GNUNET_free (
+ pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg);
GNUNET_JSON_parse_free (spec);
return GNUNET_SYSERR;
}
- GNUNET_free (pd.coin_ev);
+ GNUNET_free (pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg);
}
/* clean up */
diff --git a/src/lib/exchange_api_refresh_common.c b/src/lib/exchange_api_refresh_common.c
index 3e367566d..fa3e63fef 100644
--- a/src/lib/exchange_api_refresh_common.c
+++ b/src/lib/exchange_api_refresh_common.c
@@ -441,8 +441,10 @@ TALER_EXCHANGE_refresh_prepare (
return NULL;
}
rcd->dk = &md.fresh_pks[j];
- rcd->coin_ev = pd.coin_ev;
- rcd->coin_ev_size = pd.coin_ev_size;
+ rcd->coin_ev =
+ pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg;
+ rcd->coin_ev_size =
+ pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg_size;
}
}
diff --git a/src/lib/exchange_api_refreshes_reveal.c b/src/lib/exchange_api_refreshes_reveal.c
index 2b7fcf8cf..6fc3f1a3f 100644
--- a/src/lib/exchange_api_refreshes_reveal.c
+++ b/src/lib/exchange_api_refreshes_reveal.c
@@ -370,15 +370,22 @@ TALER_EXCHANGE_refreshes_reveal (
}
GNUNET_assert (0 ==
json_array_append_new (coin_evs,
- GNUNET_JSON_from_data (pd.coin_ev,
- pd.coin_ev_size)));
+ GNUNET_JSON_from_data (
+ pd.blinded_planchet.details.
+ rsa_blinded_planchet.blinded_msg,
+ pd.
+ blinded_planchet.details.
+ rsa_blinded_planchet.
+ blinded_msg_size)));
{
struct TALER_CoinSpendSignatureP link_sig;
TALER_wallet_link_sign (&denom_hash,
&transfer_pub,
- pd.coin_ev,
- pd.coin_ev_size,
+ pd.blinded_planchet.details.rsa_blinded_planchet.
+ blinded_msg,
+ pd.blinded_planchet.details.rsa_blinded_planchet.
+ blinded_msg_size,
&md->melted_coin.coin_priv,
&link_sig);
GNUNET_assert (0 ==
@@ -386,7 +393,7 @@ TALER_EXCHANGE_refreshes_reveal (
link_sigs,
GNUNET_JSON_from_data_auto (&link_sig)));
}
- GNUNET_free (pd.coin_ev);
+ GNUNET_free (pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg);
}
/* build array of transfer private keys */
diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c
index 5e823ee6d..5834306eb 100644
--- a/src/lib/exchange_api_withdraw.c
+++ b/src/lib/exchange_api_withdraw.c
@@ -200,7 +200,7 @@ TALER_EXCHANGE_withdraw (
reserve_priv,
&handle_reserve_withdraw_finished,
wh);
- GNUNET_free (pd.coin_ev);
+ GNUNET_free (pd.blinded_planchet.details.rsa_blinded_planchet.blinded_msg);
return wh;
}
diff --git a/src/lib/exchange_api_withdraw2.c b/src/lib/exchange_api_withdraw2.c
index d50892e5b..c8eb31822 100644
--- a/src/lib/exchange_api_withdraw2.c
+++ b/src/lib/exchange_api_withdraw2.c
@@ -437,9 +437,11 @@ TALER_EXCHANGE_withdraw2 (
TALER_amount_hton (&req.amount_with_fee,
&wh->requested_amount);
- TALER_coin_ev_hash (pd->coin_ev,
- pd->coin_ev_size,
- &req.h_coin_envelope);
+ TALER_coin_ev_hash (
+ pd->blinded_planchet.details.rsa_blinded_planchet.blinded_msg,
+ pd->blinded_planchet.details.rsa_blinded_planchet.
+ blinded_msg_size,
+ &req.h_coin_envelope);
GNUNET_CRYPTO_eddsa_sign (&reserve_priv->eddsa_priv,
&req,
&reserve_sig.eddsa_signature);
@@ -452,8 +454,10 @@ TALER_EXCHANGE_withdraw2 (
GNUNET_JSON_pack_data_auto ("denom_pub_hash",
&pd->denom_pub_hash),
GNUNET_JSON_pack_data_varsize ("coin_ev",
- pd->coin_ev,
- pd->coin_ev_size),
+ pd->blinded_planchet.details.
+ rsa_blinded_planchet.blinded_msg,
+ pd->blinded_planchet.details.
+ rsa_blinded_planchet.blinded_msg_size),
GNUNET_JSON_pack_data_auto ("reserve_sig",
&reserve_sig));
GNUNET_log (GNUNET_ERROR_TYPE_INFO,