summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-10-25 22:54:43 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-10-27 20:09:06 +0200
commit079429a2a2e419d0e3913e163daacc55dac3cd7b (patch)
treef296afb84ca3a0ac5785f5e5a3e1cb1989baea7c /src/lib
parent4a0075084de92d34b83a88b2bcd69568c7b2bf7e (diff)
downloadmerchant-079429a2a2e419d0e3913e163daacc55dac3cd7b.tar.gz
merchant-079429a2a2e419d0e3913e163daacc55dac3cd7b.tar.bz2
merchant-079429a2a2e419d0e3913e163daacc55dac3cd7b.zip
modifications for new blind signing API
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_reward_pickup.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/merchant_api_reward_pickup.c b/src/lib/merchant_api_reward_pickup.c
index fd5cf9cc..6302ba06 100644
--- a/src/lib/merchant_api_reward_pickup.c
+++ b/src/lib/merchant_api_reward_pickup.c
@@ -55,7 +55,7 @@ struct PlanchetData
/**
* Nonce used for @e csr request, if any.
*/
- struct TALER_CsNonce nonce;
+ union GNUNET_CRYPTO_BlindSessionNonce nonce;
/**
* Handle for a /csr request we may optionally need
@@ -241,15 +241,11 @@ pickup_post_csr (struct TALER_MERCHANT_RewardPickupHandle *tp)
TALER_planchet_blinding_secret_create (&pd->ps,
&pcd->exchange_vals,
&pcd->bks);
- if (TALER_DENOMINATION_CS == pcd->exchange_vals.cipher)
- {
- details[i].blinded_planchet.details.cs_blinded_planchet.nonce
- = pd->nonce;
- }
if (GNUNET_OK !=
TALER_planchet_prepare (&pd->pk.key,
&pcd->exchange_vals,
&pcd->bks,
+ &pd->nonce,
&pcd->coin_priv,
NULL,
&tp->planchets[i].c_hash,
@@ -368,19 +364,19 @@ TALER_MERCHANT_reward_pickup (
tp->planchets[i].pk = *pds[i].pk;
TALER_denom_pub_deep_copy (&tp->planchets[i].pk.key,
&pds[i].pk->key);
- switch (pk->key.cipher)
+ switch (pk->key.bsign_pub_key->cipher)
{
- case TALER_DENOMINATION_RSA:
- pcd->exchange_vals.cipher = TALER_DENOMINATION_RSA;
+ case GNUNET_CRYPTO_BSA_RSA:
+ pcd->exchange_vals = *TALER_denom_ewv_rsa_singleton ();
break;
- case TALER_DENOMINATION_CS:
+ case GNUNET_CRYPTO_BSA_CS:
{
TALER_cs_withdraw_nonce_derive (&pd->ps,
- &pd->nonce);
+ &pd->nonce.cs_nonce);
pd->csr = TALER_EXCHANGE_csr_withdraw (ctx,
exchange_url,
&pd->pk,
- &pd->nonce,
+ &pd->nonce.cs_nonce,
&csr_cb,
pd);
if (NULL == pd->csr)