From 430bb0624ae60e78c3e9855bd7827cc407471871 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Thu, 20 Jul 2023 18:13:48 +0200 Subject: [age-withdraw] Added testing commands for age-withdraw and -reveal Implemented - TALER_TESTING_cmd_age_withdraw - TALER_TESTING_cmd_age_withdraw_reveal Note: No test is using those commands yet. --- src/lib/exchange_api_age_withdraw.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/lib/exchange_api_age_withdraw.c') diff --git a/src/lib/exchange_api_age_withdraw.c b/src/lib/exchange_api_age_withdraw.c index 4bbbe5a4..c68fe67d 100644 --- a/src/lib/exchange_api_age_withdraw.c +++ b/src/lib/exchange_api_age_withdraw.c @@ -51,12 +51,6 @@ struct CoinCandidate */ struct TALER_EXCHANGE_AgeWithdrawCoinPrivateDetails details; - /** - * Hash of the public key of the coin we are signing. - */ - struct TALER_CoinPubHashP h_coin_pub; - - /** * Blinded hash of the coin **/ @@ -765,7 +759,7 @@ copy_results ( { struct TALER_EXCHANGE_AgeWithdrawHandle *awh = cls; uint8_t idx = awbr->details.ok.noreveal_index; - struct TALER_EXCHANGE_AgeWithdrawCoinPrivateDetails coins[awh->num_coins]; + struct TALER_EXCHANGE_AgeWithdrawCoinPrivateDetails details[awh->num_coins]; struct TALER_BlindedCoinHashP blinded_coin_hs[awh->num_coins]; struct TALER_EXCHANGE_AgeWithdrawResponse resp = { .hr = awbr->hr, @@ -774,14 +768,15 @@ copy_results ( .h_commitment = awbr->details.ok.h_commitment, .exchange_pub = awbr->details.ok.exchange_pub, .num_coins = awh->num_coins, - .coins = coins, + .coin_details = details, .blinded_coin_hs = blinded_coin_hs}, }, }; for (size_t n = 0; n< awh->num_coins; n++) { - coins[n] = awh->coin_data[n].coin_candidates[idx].details; + details[n] = awh->coin_data[n].coin_candidates[idx].details; + details[n].planchet = awh->coin_data[n].planchet_details[idx]; blinded_coin_hs[n] = awh->coin_data[n].coin_candidates[idx].blinded_coin_h; } @@ -915,7 +910,7 @@ csr_withdraw_done ( &can->details.blinding_key, &can->details.coin_priv, &can->details.h_age_commitment, - &can->h_coin_pub, + &can->details.h_coin_pub, planchet)) { GNUNET_break (0); @@ -1035,7 +1030,7 @@ prepare_coins ( &can->details.blinding_key, &can->details.coin_priv, &can->details.h_age_commitment, - &can->h_coin_pub, + &can->details.h_coin_pub, planchet)); FAIL_IF (GNUNET_OK != TALER_coin_ev_hash (&planchet->blinded_planchet, -- cgit v1.2.3