exchange

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

commit e1d029f5aff931c5e56f211b69c7c1af4356bd2c
parent f32c0503fd56ed4014633ff1796efec0566d2a46
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Fri, 14 Aug 2026 18:24:51 +0200

sign over big-endian numbers

Diffstat:
Msrc/util/age_restriction.c | 3---
Msrc/util/wallet_signatures.c | 18+++++++++---------
2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c @@ -73,9 +73,6 @@ TALER_age_commitment_hash ( } -/* To a given age value between 0 and 31, returns the index of the age group - * defined by the given mask. - */ uint8_t TALER_get_age_group ( const struct TALER_AgeMask *mask, diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c @@ -758,16 +758,16 @@ struct TALER_WithdrawRequestPS /** * Maximum age group that the coins are going to be restricted to. - * MUST be 0 if no age restriction applies. + * MUST be 0 if no age restriction applies. In big endian. */ uint32_t max_age_group; /** - * The mask that defines the age groups. + * The mask that defines the age groups in big endian. * MUST be the same for all denominations. * MUST be 0 if no age restriction applies. */ - struct TALER_AgeMask mask; + uint32_t mask_bits; }; @@ -874,10 +874,10 @@ TALER_wallet_withdraw_sign ( req.h_planchets = *h_planchets; if (NULL != mask) { - req.mask = *mask; + req.mask_bits = htonl (mask->bits); req.max_age_group = - TALER_get_age_group (mask, - max_age); + htonl (TALER_get_age_group (mask, + max_age)); } TALER_amount_hton (&req.amount, amount); @@ -914,10 +914,10 @@ TALER_wallet_withdraw_verify ( req.h_planchets = *h_planchets; if (NULL != mask) { - req.mask = *mask; + req.mask_bits = htonl (mask->bits); req.max_age_group = - TALER_get_age_group (mask, - max_age); + htonl (TALER_get_age_group (mask, + max_age)); } TALER_amount_hton (&req.amount, amount);