gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated (758a1490 -> b231cc94)


From: gnunet
Subject: [taler-exchange] branch master updated (758a1490 -> b231cc94)
Date: Tue, 23 Aug 2022 14:36:06 +0200

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

grothoff pushed a change to branch master
in repository exchange.

    from 758a1490 -fix report generation field name missmatch
     new 624c5fda -avoid double next
     new b231cc94 enforce syntax of reserve_uri

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/auditor/report-lib.c                    |  3 +++
 src/auditor/test-auditor.sh                 |  3 ++-
 src/exchange-tools/taler-exchange-offline.c | 11 ++++++++---
 src/include/taler_crypto_lib.h              |  8 ++++----
 src/util/wallet_signatures.c                | 20 ++++++++++++++++----
 5 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/src/auditor/report-lib.c b/src/auditor/report-lib.c
index e4f66b31..248e14e1 100644
--- a/src/auditor/report-lib.c
+++ b/src/auditor/report-lib.c
@@ -588,6 +588,9 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
       GNUNET_free (master_public_key_str);
       return GNUNET_SYSERR;
     }
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Running auditor against exchange master public key `%s'\n",
+                master_public_key_str);
     GNUNET_free (master_public_key_str);
   } /* end of -m not given */
 
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index f7c0948f..2e847564 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -211,7 +211,8 @@ function run_audit () {
     pre_audit ${1:-no}
     if test ${2:-no} = "drain"
     then
-        echo -n "Running taler-exchange-offline drain ..."
+        echo -n "Running taler-exchange-offline drain with master public key "
+        gnunet-ecc -p ${DB}.mpriv
         cp "${CONF}" "${CONF}.tmp"
         taler-config -c "${CONF}.tmp" -s exchange-offline -o MASTER_PRIV_FILE 
-V ${DB}.mpriv
         echo -n "Starting exchange..."
diff --git a/src/exchange-tools/taler-exchange-offline.c 
b/src/exchange-tools/taler-exchange-offline.c
index a4413a24..839b8e22 100644
--- a/src/exchange-tools/taler-exchange-offline.c
+++ b/src/exchange-tools/taler-exchange-offline.c
@@ -4265,7 +4265,7 @@ do_extensions_show (char *const *args)
               json_dumps (obj,
                           JSON_INDENT (2)));
   json_decref (obj);
-  next (args);
+  next (args + 1);
 }
 
 
@@ -4326,10 +4326,16 @@ do_extensions_sign (char *const *args)
       &sig));
   output_operation (OP_EXTENSIONS,
                     obj);
-  next (args);
+  next (args + 1);
 }
 
 
+/**
+ * Dispatch @a args in the @a cmds array.
+ *
+ * @param args arguments with subcommand to dispatch
+ * @param cmds array of possible subcommands to call
+ */
 static void
 cmd_handler (char *const *args,
              const struct SubCommand *cmds)
@@ -4397,7 +4403,6 @@ do_work_extensions (char *const *args)
   }
 
   cmd_handler (args, cmds);
-  next (args + 1);
 }
 
 
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 503cb13c..ac1aba73 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -2929,7 +2929,7 @@ TALER_wallet_purse_deposit_verify (
 /**
  * Sign a request by a purse to merge it into an account.
  *
- * @param reserve_url identifies the location of the reserve
+ * @param reserve_uri identifies the location of the reserve
  * @param merge_timestamp time when the merge happened
  * @param purse_pub key identifying the purse
  * @param merge_priv key identifying the merge capability
@@ -2937,7 +2937,7 @@ TALER_wallet_purse_deposit_verify (
  */
 void
 TALER_wallet_purse_merge_sign (
-  const char *reserve_url,
+  const char *reserve_uri,
   struct GNUNET_TIME_Timestamp merge_timestamp,
   const struct TALER_PurseContractPublicKeyP *purse_pub,
   const struct TALER_PurseMergePrivateKeyP *merge_priv,
@@ -2947,7 +2947,7 @@ TALER_wallet_purse_merge_sign (
 /**
  * Verify a purse merge request.
  *
- * @param reserve_url identifies the location of the reserve
+ * @param reserve_uri identifies the location of the reserve
  * @param merge_timestamp time when the merge happened
  * @param purse_pub public key of the purse to merge
  * @param merge_pub public key of the merge capability
@@ -2956,7 +2956,7 @@ TALER_wallet_purse_merge_sign (
  */
 enum GNUNET_GenericReturnValue
 TALER_wallet_purse_merge_verify (
-  const char *reserve_url,
+  const char *reserve_uri,
   struct GNUNET_TIME_Timestamp merge_timestamp,
   const struct TALER_PurseContractPublicKeyP *purse_pub,
   const struct TALER_PurseMergePublicKeyP *merge_pub,
diff --git a/src/util/wallet_signatures.c b/src/util/wallet_signatures.c
index 4761ab6e..1b16731f 100644
--- a/src/util/wallet_signatures.c
+++ b/src/util/wallet_signatures.c
@@ -1009,7 +1009,7 @@ struct TALER_PurseMergePS
 
 void
 TALER_wallet_purse_merge_sign (
-  const char *reserve_url,
+  const char *reserve_uri,
   struct GNUNET_TIME_Timestamp merge_timestamp,
   const struct TALER_PurseContractPublicKeyP *purse_pub,
   const struct TALER_PurseMergePrivateKeyP *merge_priv,
@@ -1022,7 +1022,11 @@ TALER_wallet_purse_merge_sign (
     .purse_pub = *purse_pub
   };
 
-  TALER_payto_hash (reserve_url,
+  GNUNET_assert (0 ==
+                 strcasecmp (reserve_uri,
+                             "payto://taler-reserve",
+                             strlen ("payto://taler-reserve")));
+  TALER_payto_hash (reserve_uri,
                     &pm.h_payto);
   GNUNET_CRYPTO_eddsa_sign (&merge_priv->eddsa_priv,
                             &pm,
@@ -1032,7 +1036,7 @@ TALER_wallet_purse_merge_sign (
 
 enum GNUNET_GenericReturnValue
 TALER_wallet_purse_merge_verify (
-  const char *reserve_url,
+  const char *reserve_uri,
   struct GNUNET_TIME_Timestamp merge_timestamp,
   const struct TALER_PurseContractPublicKeyP *purse_pub,
   const struct TALER_PurseMergePublicKeyP *merge_pub,
@@ -1045,7 +1049,15 @@ TALER_wallet_purse_merge_verify (
     .purse_pub = *purse_pub
   };
 
-  TALER_payto_hash (reserve_url,
+  if (0 !=
+      strcasecmp (reserve_uri,
+                  "payto://taler-reserve",
+                  strlen ("payto://taler-reserve")))
+  {
+    GNUNET_break (0);
+    return GNUNET_NO;
+  }
+  TALER_payto_hash (reserve_uri,
                     &pm.h_payto);
   return GNUNET_CRYPTO_eddsa_verify (
     TALER_SIGNATURE_WALLET_PURSE_MERGE,

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