gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated (a4323c2 -> 711c248)


From: gnunet
Subject: [taler-anastasis] branch master updated (a4323c2 -> 711c248)
Date: Sat, 04 Apr 2020 11:41:10 +0200

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

dennis-neufeld pushed a change to branch master
in repository anastasis.

    from a4323c2  renaming, indent
     new a4c60d9  fix for api test (didn't start before, not passing yet)
     new 711c248  conservatively use strtok_r

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/lib/Makefile.am                    |  9 ++++++---
 src/lib/anastasis_api_policy_lookup.c  | 11 +++++++----
 src/lib/anastasis_api_policy_store.c   | 11 +++++++----
 src/lib/test_anastasis_api.conf        | 30 ++++++++++++++++++++++++++----
 src/lib/testing_api_cmd_policy_store.c |  3 +--
 5 files changed, 47 insertions(+), 17 deletions(-)

diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 1be06a7..ea2da4a 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -23,6 +23,8 @@ libanastasisrest_la_SOURCES = \
   anastasis_api_policy_lookup.c \
   anastasis_api_curl_defaults.c anastasis_api_curl_defaults.h
 libanastasisrest_la_LIBADD = \
+  -lgnunetcurl \
+  -lgnunetjson \
   -lgnunetutil \
   -ljansson \
   -ltalerutil \
@@ -103,7 +105,8 @@ test_anastasisrest_api_LDADD = \
 
 EXTRA_DIST = \
   test_anastasis_api.conf \
+  test_anastasis_api_home/.config/taler/exchange/account-2.json \
   test_anastasis_api_home/.local/share/taler/exchange/offline-keys/master.priv 
\
-  test_anastasis_api_home/.config/taler/merchant/wire/test.json \
-  test_anastasis_api_home/.config/taler/test.json \
-  test_merchant.priv
+  #test_anastasis_api_home/.config/taler/merchant/wire/test.json \
+  #test_anastasis_api_home/.config/taler/test.json \
+  #test_merchant.priv
diff --git a/src/lib/anastasis_api_policy_lookup.c 
b/src/lib/anastasis_api_policy_lookup.c
index a216c2d..9d2abed 100644
--- a/src/lib/anastasis_api_policy_lookup.c
+++ b/src/lib/anastasis_api_policy_lookup.c
@@ -214,18 +214,21 @@ handle_header (char *buffer,
   char *ndup;
   const char *hdr_type;
   char *hdr_val;
+  char *sp;
 
   ndup = GNUNET_strndup (buffer,
                          total);
-  hdr_type = strtok (ndup,
-                     ":");
+  hdr_type = strtok_r (ndup,
+                       ":",
+                       &sp);
   if (NULL == hdr_type)
   {
     GNUNET_free (ndup);
     return total;
   }
-  hdr_val = strtok (NULL,
-                    "\n\r");
+  hdr_val = strtok_r (NULL,
+                      "\n\r",
+                      &sp);
   if (NULL == hdr_val)
   {
     GNUNET_free (ndup);
diff --git a/src/lib/anastasis_api_policy_store.c 
b/src/lib/anastasis_api_policy_store.c
index 413de05..36834bd 100644
--- a/src/lib/anastasis_api_policy_store.c
+++ b/src/lib/anastasis_api_policy_store.c
@@ -210,18 +210,21 @@ handle_header (char *buffer,
   char *ndup;
   const char *hdr_type;
   char *hdr_val;
+  char *sp;
 
   ndup = GNUNET_strndup (buffer,
                          total);
-  hdr_type = strtok (ndup,
-                     ":");
+  hdr_type = strtok_r (ndup,
+                       ":",
+                       &sp);
   if (NULL == hdr_type)
   {
     GNUNET_free (ndup);
     return total;
   }
-  hdr_val = strtok (NULL,
-                    "");
+  hdr_val = strtok_r (NULL,
+                      "",
+                      &sp);
   if (NULL == hdr_val)
   {
     GNUNET_free (ndup);
diff --git a/src/lib/test_anastasis_api.conf b/src/lib/test_anastasis_api.conf
index 101646a..fa520f7 100644
--- a/src/lib/test_anastasis_api.conf
+++ b/src/lib/test_anastasis_api.conf
@@ -5,13 +5,13 @@
 TALER_TEST_HOME = test_anastasis_api_home/
 
 # Persistant data storage
-TALER_DATA_HOME = $TALER_HOME/.local/share/taler/
+TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
 
 # Configuration files
-TALER_CONFIG_HOME = $TALER_HOME/.config/taler/
+TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
 
 # Cached data, no big deal if lost
-TALER_CACHE_HOME = $TALER_HOME/.cache/taler/
+TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
 
 [taler]
 # What currency do we use?
@@ -154,11 +154,33 @@ DB = postgres
 PORT = 8081
 
 # Our public key
-MASTER_PUBLIC_KEY = WEC7J41PBGDN24JTNRVBFXK5JRV6CK9B8YRTWW7QGFH2GERBGH1G
+MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
 
 # Base URL of the exchange.
 BASE_URL = "http://localhost:8081/";
 
+
+##############################################################
+## Added following lines because they were complaint in log ##
+# START
+
+# Where do we store the private keys the exchange needs at
+# runtime? (Denomination and signing keys are then stored
+# in respective subdirectories.)
+KEYDIR = ${TALER_DATA_HOME}/exchange/live-keys/
+
+# Directory where the exchange expects to find revocation
+# certificates (and where taler-exchange-keyup will write them).
+REVOCATION_DIR = ${TALER_DATA_HOME}/exchange/revocations/
+
+# Network configuration for the normal API/service HTTP server
+# serve via tcp socket (on PORT)
+SERVE = tcp
+
+# END
+##############################################################
+
+
 [exchangedb-postgres]
 CONFIG = "postgres:///talercheck"
 
diff --git a/src/lib/testing_api_cmd_policy_store.c 
b/src/lib/testing_api_cmd_policy_store.c
index 088dcc9..b6e7af0 100644
--- a/src/lib/testing_api_cmd_policy_store.c
+++ b/src/lib/testing_api_cmd_policy_store.c
@@ -258,6 +258,7 @@ policy_store_run (void *cls,
                   struct TALER_TESTING_Interpreter *is)
 {
   struct PolicyStoreState *pss = cls;
+
   pss->is = is;
   if (NULL != pss->prev_upload)
   {
@@ -354,12 +355,10 @@ policy_store_run (void *cls,
     GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_WEAK,
                                 &pss->prev_hash,
                                 sizeof (struct GNUNET_HashCode));
-
   // hash recovery data
   GNUNET_CRYPTO_hash (pss->recovery_data,
                       pss->recovery_data_size,
                       &pss->curr_hash);
-
   pss->pso = ANASTASIS_policy_store (is->ctx,
                                      pss->anastasis_url,
                                      &pss->anastasis_priv,

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



reply via email to

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