gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: -fix derivation, logging


From: gnunet
Subject: [taler-exchange] branch master updated: -fix derivation, logging
Date: Wed, 27 Apr 2022 00:02:06 +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 9a05781a -fix derivation, logging
9a05781a is described below

commit 9a05781ab37470e5b2cb22d6992c00b2913075e7
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Apr 27 00:00:15 2022 +0200

    -fix derivation, logging
---
 src/util/age_restriction.c      |  4 ++--
 src/util/test_age_restriction.c | 20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c
index 65c1574b..0ee020eb 100644
--- a/src/util/age_restriction.c
+++ b/src/util/age_restriction.c
@@ -201,8 +201,8 @@ TALER_age_commitment_derive (
   {
     GNUNET_CRYPTO_edx25519_public_key_derive (
       &orig->commitment.keys[i].pub,
-      &salt,
-      sizeof(salt),
+      salt,
+      sizeof(*salt),
       &newacp->commitment.keys[i].pub);
   }
 
diff --git a/src/util/test_age_restriction.c b/src/util/test_age_restriction.c
index 847ab4e9..9e799ce9 100644
--- a/src/util/test_age_restriction.c
+++ b/src/util/test_age_restriction.c
@@ -199,13 +199,21 @@ test_attestation (void)
           age_group,
           min_group);
 
+        GNUNET_break (GNUNET_OK == ret);
+
         if (min_group <= age_group &&
             GNUNET_OK != ret)
+        {
+          GNUNET_break (0);
           ret = GNUNET_SYSERR;
+        }
 
         if (min_group > age_group &&
             GNUNET_NO != ret)
+        {
+          GNUNET_break (0);
           ret = GNUNET_SYSERR;
+        }
 
         if (min_group > age_group)
           continue;
@@ -224,14 +232,20 @@ test_attestation (void)
           min_group);
 
         if (GNUNET_OK != ret)
+        {
+          GNUNET_break (0);
           break;
+        }
       }
 
       TALER_age_commitment_proof_free (&acp[i]);
     }
 
     if (GNUNET_SYSERR == ret)
+    {
+      GNUNET_break (0);
       return ret;
+    }
   }
   return GNUNET_OK;
 }
@@ -243,10 +257,16 @@ main (int argc,
 {
   (void) argc;
   (void) argv;
+  GNUNET_log_setup ("test-age-restriction",
+                    "INFO",
+                    NULL);
   if (GNUNET_OK != test_groups ())
     return 1;
   if (GNUNET_OK != test_attestation ())
+  {
+    GNUNET_break (0);
     return 2;
+  }
   return 0;
 }
 

-- 
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]