gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: set age mask before hashing age


From: gnunet
Subject: [taler-exchange] branch master updated: set age mask before hashing age commitment
Date: Mon, 05 Sep 2022 13:45:11 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 0c0c5986 set age mask before hashing age commitment
0c0c5986 is described below

commit 0c0c5986129a472ba18a958ba59be227affde9ef
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Sep 5 13:45:08 2022 +0200

    set age mask before hashing age commitment
---
 src/exchange/taler-exchange-httpd_common_deposit.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_common_deposit.c 
b/src/exchange/taler-exchange-httpd_common_deposit.c
index 1e431299..3420f9ca 100644
--- a/src/exchange/taler-exchange-httpd_common_deposit.c
+++ b/src/exchange/taler-exchange-httpd_common_deposit.c
@@ -68,10 +68,6 @@ TEH_common_purse_deposit_parse_coin (
       return res;
   }
 
-  if (! coin->cpi.no_age_commitment)
-    TALER_age_commitment_hash (&coin->age_commitment,
-                               &coin->cpi.h_age_commitment);
-
   /* check denomination exists and is valid */
   {
     struct TEH_DenominationKey *dk;
@@ -85,6 +81,12 @@ TEH_common_purse_deposit_parse_coin (
       GNUNET_JSON_parse_free (spec);
       return (MHD_YES == mret) ? GNUNET_NO : GNUNET_SYSERR;
     }
+    if (! coin->cpi.no_age_commitment)
+    {
+      coin->age_commitment.mask = dk->meta.age_mask;
+      TALER_age_commitment_hash (&coin->age_commitment,
+                                 &coin->cpi.h_age_commitment);
+    }
     if (0 > TALER_amount_cmp (&dk->meta.value,
                               &coin->amount))
     {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]