gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: fix #5434 (no more


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix #5434 (no more salt in exchange wire replies)
Date: Sat, 06 Oct 2018 15:05:31 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 9dd7d3d  fix #5434 (no more salt in exchange wire replies)
9dd7d3d is described below

commit 9dd7d3d580fa4afde9e5d56be0b40bd3d9ad08ac
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Oct 6 15:05:03 2018 +0200

    fix #5434 (no more salt in exchange wire replies)
---
 src/backend/taler-merchant-httpd.c                     | 18 ++++++++++++++----
 .../.config/taler/exchange/account-2.json              |  3 +--
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 213e115..9fbec95 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -777,8 +777,18 @@ wireformat_iterator_cb (void *cls,
   }
   else /* need to generate JSON */
   {
-    j = TALER_JSON_wire_signature_make (payto,
-                                        NULL);
+    struct GNUNET_HashCode salt;
+    char *salt_str;
+
+    GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
+                                &salt,
+                                sizeof (salt));
+    salt_str = GNUNET_STRINGS_data_to_string_alloc (&salt,
+                                                    sizeof (salt));
+    j = json_pack ("{s:s, s:s}",
+                   "url", payto,
+                   "salt", salt_str);
+    GNUNET_free (salt_str);
     if (0 != json_dump_file (j,
                              fn,
                              JSON_COMPACT | JSON_SORT_KEYS))
@@ -796,8 +806,8 @@ wireformat_iterator_cb (void *cls,
   GNUNET_free (fn);
 
   if (GNUNET_OK !=
-      TALER_JSON_wire_signature_hash (j,
-                                      &h_wire))
+      TALER_JSON_merchant_wire_signature_hash (j,
+                                               &h_wire))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to hash wire input\n");
diff --git 
a/src/lib/test_merchant_api_home/.config/taler/exchange/account-2.json 
b/src/lib/test_merchant_api_home/.config/taler/exchange/account-2.json
index ec23ade..e8a000b 100644
--- a/src/lib/test_merchant_api_home/.config/taler/exchange/account-2.json
+++ b/src/lib/test_merchant_api_home/.config/taler/exchange/account-2.json
@@ -1,5 +1,4 @@
 {
   "url": "payto://x-taler-bank/localhost:8082/2",
-  "salt": 
"AX69JV6JVW31AHK24RFH5907T1MVTB901TQD7E9ATFKVM1J734MN62GA3TMSRMCYKJPB7A7G2R5S658216EVM90CNNM7V7V2K6BDR3R",
-  "master_sig": 
"C9NT2J22X2Q33FH8GT04ASQSDB60TGZQP61J0D2HDJ52J4X0N7T5K2ZGPTYKGF48XA729CJ8BZ84E006DK15691XXFRF0THNMQSZP0G"
+  "master_sig": 
"RDPWNT0CDATHWRY99W7G3E2Y1GYAABTE25J8GHKPGXV07TM89W1502BG5Q82FQY0JR4HSABJC6RG92PA93QGTKWM85W64TE9CCVW63R"
 }
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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