From 079429a2a2e419d0e3913e163daacc55dac3cd7b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 25 Oct 2023 22:54:43 +0200 Subject: modifications for new blind signing API --- src/lib/merchant_api_reward_pickup.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/lib') 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) -- cgit v1.2.3