gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: [util] minor changes


From: gnunet
Subject: [taler-donau] branch master updated: [util] minor changes
Date: Wed, 08 Nov 2023 12:10:14 +0100

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

lukas-matyja pushed a commit to branch master
in repository donau.

The following commit(s) were added to refs/heads/master by this push:
     new 520c6e2  [util] minor changes
520c6e2 is described below

commit 520c6e2550402bb3ae6ae6b4e78523b12283c3b3
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Wed Nov 8 12:10:41 2023 +0100

    [util] minor changes
---
 src/include/donau_crypto_lib.h | 10 +++++-----
 src/util/charity_signatures.c  | 21 +++++++++++----------
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/include/donau_crypto_lib.h b/src/include/donau_crypto_lib.h
index 2176881..7146947 100644
--- a/src/include/donau_crypto_lib.h
+++ b/src/include/donau_crypto_lib.h
@@ -14,7 +14,7 @@
   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
 */
 /**
- * @file include/taler_crypto_lib.h
+ * @file include/donau_crypto_lib.h
  * @file include/gnunet_crypto_lib.h
  * @brief taler-specific crypto functions
  * @author Sree Harsha Totakura <sreeharsha@totakura.in>
@@ -23,7 +23,7 @@
  * @author Lukas Matyja
  */
 #if ! defined (__TALER_DONAU_UTIL_LIB_H_INSIDE__)
-#error "Only <taler_donau_util.h> can be included directly."
+ #error "Only <donau_util.h> can be included directly."
 #endif
 
 #ifndef TALER_DONAU_CRYPTO_LIB_H
@@ -110,7 +110,7 @@ struct TALER_DonauSignatureP
   /**
    * Donau uses EdDSA for for non-blind signatures.
    */
-  struct GNUNET_CRYPTO_EddsaSignature eddsa_signature;
+  struct GNUNET_CRYPTO_EddsaSignature eddsa_sig;
 };
 
 /**
@@ -121,7 +121,7 @@ struct TALER_DONAU_CharitySignatureP
   /**
    * Charities use EdDSA signatures.
    */
-  struct GNUNET_CRYPTO_EddsaSignature eddsa_signature;
+  struct GNUNET_CRYPTO_EddsaSignature eddsa_sig;
 };
 
 /**
@@ -169,7 +169,7 @@ 
TALER_charity_blinded_unique_donation_identifier_key_pair_verify (
   const unsigned int num_bkp,
   const struct TALER_BlindedUniqueDonationIdentifierKeyPair *bkp[static 
num_bkp],
   const struct TALER_DONAU_CharityPublicKeyP *charity_pub,
-  struct TALER_CharitySignatureP *charity_sig);
+  const struct TALER_CharitySignatureP *charity_sig);
 
 
 #endif
diff --git a/src/util/charity_signatures.c b/src/util/charity_signatures.c
index ee5dbbd..40cf875 100644
--- a/src/util/charity_signatures.c
+++ b/src/util/charity_signatures.c
@@ -17,6 +17,7 @@
  * @file charity_signatures.c
  * @brief Utility functions for Taler charity signatures
  * @author Christian Grothoff
+ * @author Lukas Matyja
  */
 #include "donau_util.h"
 #include <taler/taler_signatures.h>
@@ -30,8 +31,8 @@ 
TALER_charity_blinded_unique_donation_identifier_key_pair_sign (
   struct TALER_CharitySignatureP *charity_sig)
 {
   struct TALER_BudiKeyPairTrackPS tps = {
-    .purpose.size = htonl (sizeof (bk[0])* num_bkp),
-    .purpose.purpose = htonl (TALER_SIGNATURE_CHARITY_TRACK_TRANSACTION),
+    .purpose.size = htonl (sizeof (bkp[0])* num_bkp),
+    .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
     .bkp = *bkp,
   };
 
@@ -40,16 +41,16 @@ 
TALER_charity_blinded_unique_donation_identifier_key_pair_sign (
                             &charity_sig->eddsa_sig);
 }
 
-GNUNET_NETWORK_STRUCT_BEGIN
+
 
 /**
  * @brief Format used to generate the signature on a request to obtain
- * the wire transfer identifier associated with a deposit.
+ * the wire transfer identifier associated with a donation.
  */
-struct TALER_DepositTrackPS
+struct TALER_BudiKeyPairTrackPS
 {
   /**
-   * Purpose must be #TALER_SIGNATURE_CHARITY_TRACK_TRANSACTION.
+   * Purpose must be #TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION.
    */
   struct GNUNET_CRYPTO_EccSignaturePurpose purpose;
 
@@ -66,24 +67,24 @@ struct TALER_DepositTrackPS
 
 };
 
-GNUNET_NETWORK_STRUCT_END
+
 
 enum GNUNET_GenericReturnValue
 TALER_charity_blinded_unique_donation_identifier_key_pair_verify (
   const unsigned int num_bkp,
   const struct TALER_BlindedUniqueDonationIdentifierKeyPair *bkp[static 
num_bkp],
   const struct TALER_DONAU_CharityPublicKeyP *charity_pub,
-  struct TALER_CharitySignatureP *charity_sig)
+  const struct TALER_CharitySignatureP *charity_sig)
 {
   struct TALER_BudiKeyPairTrackPS tps = {
-    .purpose.size = htonl (sizeof (bk[0])* num_bkp),
+    .purpose.size = htonl (sizeof (bkp[0])* num_bkp),
     .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION),
     .num_bkp = num_bkp,
     .bkp = *bkp
   };
 
   return
-    GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_CHARITY_TRACK_TRANSACTION,
+    GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_MERCHANT_TRACK_TRANSACTION,
                                 &tps,
                                 &charity_sig->eddsa_sig,
                                 &charity_pub->eddsa_pub);

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