From d20804124025c259af1bc3e00ceed653c734b468 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Wed, 26 Jul 2023 17:36:13 +0200 Subject: [age-withdraw] reveal works, tested. Tests for age-withdraw and the reveal now work for both, RSA and CS. --- src/lib/exchange_api_age_withdraw_reveal.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib/exchange_api_age_withdraw_reveal.c') diff --git a/src/lib/exchange_api_age_withdraw_reveal.c b/src/lib/exchange_api_age_withdraw_reveal.c index 1e804bc8..a448d109 100644 --- a/src/lib/exchange_api_age_withdraw_reveal.c +++ b/src/lib/exchange_api_age_withdraw_reveal.c @@ -118,17 +118,18 @@ age_withdraw_reveal_ok ( { struct TALER_BlindedDenominationSignature denom_sigs[awrh->num_coins]; + json_t *j_sig; + size_t n; /* Reconstruct the coins and unblind the signatures */ - for (size_t n = 0; n < awrh->num_coins; n++) + json_array_foreach (j_sigs, n, j_sig) { - json_t *j_sig = json_array_get (j_sigs, n); struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_fixed_auto ("", &denom_sigs[n]), + TALER_JSON_spec_blinded_denom_sig (NULL, + &denom_sigs[n]), GNUNET_JSON_spec_end () }; - GNUNET_assert (NULL != j_sig); if (GNUNET_OK != GNUNET_JSON_parse (j_sig, spec, NULL, NULL)) @@ -136,6 +137,7 @@ age_withdraw_reveal_ok ( GNUNET_break_op (0); return GNUNET_SYSERR; } + } response.details.ok.num_sigs = awrh->num_coins; -- cgit v1.2.3