exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 3b259fc8ecf9f10e4acd703de76b176926ad1d4b
parent c8333d5769e23cdae82db8122d7f2e315e335ce6
Author: Özgür Kesim <oec-taler@kesim.org>
Date:   Fri,  6 Dec 2024 16:19:40 +0100

[util] API-change: parameter reordering for TALER_age_commitment_proof_free

Diffstat:
Msrc/include/taler_crypto_lib.h | 8+++-----
Msrc/testing/testing_api_cmd_age_withdraw.c | 8+++-----
Msrc/util/Makefile.am | 2+-
Msrc/util/age_restriction.c | 6+++---
4 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h @@ -6255,15 +6255,13 @@ TALER_age_commitment_proof_duplicate ( /** * @brief helper function to copy a struct TALER_AgeCommitmentProof * - * @param[in] acp The original age commitment proof * @param[out] nacp The struct to copy the data into, with freshly allocated and copied keys. + * @param[in] acp The original age commitment proof */ -/* FIXME: API flaw: arguments of this _copy are swapped with - the argument order for the other _copy() APIs... */ void TALER_age_commitment_proof_deep_copy ( - const struct TALER_AgeCommitmentProof *acp, - struct TALER_AgeCommitmentProof *nacp); + struct TALER_AgeCommitmentProof *nacp, + const struct TALER_AgeCommitmentProof *acp); /** * @brief For age-withdraw, clients have to prove that the public keys for all diff --git a/src/testing/testing_api_cmd_age_withdraw.c b/src/testing/testing_api_cmd_age_withdraw.c @@ -162,7 +162,7 @@ struct AgeWithdrawState }; /** - * Callback for the "age-withdraw" ooperation; It checks that the response + * Callback for the "age-withdraw" operation; It checks that the response * code is expected and store the exchange signature in the state. * * @param cls Closure of type `struct AgeWithdrawState *` @@ -196,11 +196,9 @@ age_withdraw_cb ( for (size_t n = 0; n < aws->num_coins; n++) { aws->coin_outputs[n].details = response->details.ok.coin_details[n]; - /* FIXME: API flaw: arguments of this _copy are swapped with - the argument order for the other _copy() APIs... */ TALER_age_commitment_proof_deep_copy ( - &response->details.ok.coin_details[n].age_commitment_proof, - &aws->coin_outputs[n].details.age_commitment_proof); + &aws->coin_outputs[n].details.age_commitment_proof, + &response->details.ok.coin_details[n].age_commitment_proof); TALER_denom_ewv_copy ( &aws->coin_outputs[n].details.alg_values, &response->details.ok.coin_details[n].alg_values); diff --git a/src/util/Makefile.am b/src/util/Makefile.am @@ -127,7 +127,7 @@ libtalerutil_la_LIBADD = \ -lm libtalerutil_la_LDFLAGS = \ - -version-info 4:0:0 \ + -version-info 5:0:0 \ -no-undefined diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c @@ -508,15 +508,15 @@ TALER_age_commitment_proof_duplicate ( nacp = GNUNET_new (struct TALER_AgeCommitmentProof); - TALER_age_commitment_proof_deep_copy (acp,nacp); + TALER_age_commitment_proof_deep_copy (nacp, acp); return nacp; } void TALER_age_commitment_proof_deep_copy ( - const struct TALER_AgeCommitmentProof *acp, - struct TALER_AgeCommitmentProof *nacp) + struct TALER_AgeCommitmentProof *nacp, + const struct TALER_AgeCommitmentProof *acp) { GNUNET_assert (NULL != acp); GNUNET_assert (__builtin_popcount (acp->commitment.mask.bits) - 1 ==