gnunet-svn
[Top][All Lists]
Advanced

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

[taler-donau] branch master updated: [testing] change config file


From: gnunet
Subject: [taler-donau] branch master updated: [testing] change config file
Date: Mon, 01 Jan 2024 23:51:05 +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 abf771e  [testing] change config file
abf771e is described below

commit abf771e857b36b56c14cd8cd8047f283153b2347
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
AuthorDate: Mon Jan 1 23:51:43 2024 +0100

    [testing] change config file
---
 .gitignore                      |   1 +
 src/donau/donau-httpd.c         | 230 ++++++++++++++++++++--------------------
 src/testing/test_donau_api.conf |   8 +-
 3 files changed, 123 insertions(+), 116 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2217338..a676203 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ src/donau-tools/taler-donau-dbinit
 src/donau/donau-httpd
 src/util/donau-config
 src/testing/test_donau_api_home/.local/
+src/donau-tools/donau-dbinit
diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c
index c89ae04..a1624b9 100644
--- a/src/donau/donau-httpd.c
+++ b/src/donau/donau-httpd.c
@@ -93,7 +93,7 @@ struct TALER_MasterPublicKeyP DH_master_public_key;
 /**
  * Key used to encrypt KYC attribute data in our database.
  */
-struct TALER_AttributeEncryptionKeyP DH_attribute_key;
+//struct TALER_AttributeEncryptionKeyP DH_attribute_key;
 
 /**
  * Our DB plugin.  (global)
@@ -134,7 +134,7 @@ char *DH_kyc_aml_trigger;
 /**
  * Option set to #GNUNET_YES if rewards are enabled.
  */
-int DH_enable_rewards;
+//int DH_enable_rewards;
 
 /**
  * What is the largest amount we allow a peer to
@@ -837,17 +837,17 @@ donau_serve_process_config (void)
                                "valid relative time expected");
     return GNUNET_SYSERR;
   }
-  if (GNUNET_OK !=
-      GNUNET_CONFIGURATION_get_value_string (DH_cfg,
-                                             "donau",
-                                             "KYC_AML_TRIGGER",
-                                             &DH_kyc_aml_trigger))
-  {
-    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                               "donau",
-                               "KYC_AML_TRIGGER");
-    return GNUNET_SYSERR;
-  }
+  // if (GNUNET_OK !=
+  //     GNUNET_CONFIGURATION_get_value_string (DH_cfg,
+  //                                            "donau",
+  //                                            "KYC_AML_TRIGGER",
+  //                                            &DH_kyc_aml_trigger))
+  // {
+  //   GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+  //                              "donau",
+  //                              "KYC_AML_TRIGGER");
+  //   return GNUNET_SYSERR;
+  // }
   if (GNUNET_OK !=
       TALER_config_get_currency (DH_cfg,
                                  &DH_currency))
@@ -886,55 +886,55 @@ donau_serve_process_config (void)
                 "Need amount in section `donau' under `AML_THRESHOLD'\n");
     return GNUNET_SYSERR;
   }
-  if (GNUNET_OK !=
-      TALER_config_get_amount (DH_cfg,
-                               "donau",
-                               "STEFAN_ABS",
-                               &DH_stefan_abs))
-  {
-    GNUNET_assert (GNUNET_OK ==
-                   TALER_amount_set_zero (DH_currency,
-                                          &DH_stefan_abs));
-  }
-  if (GNUNET_OK !=
-      TALER_config_get_amount (DH_cfg,
-                               "donau",
-                               "STEFAN_LOG",
-                               &DH_stefan_log))
-  {
-    GNUNET_assert (GNUNET_OK ==
-                   TALER_amount_set_zero (DH_currency,
-                                          &DH_stefan_log));
-  }
-  if (GNUNET_OK !=
-      TALER_config_get_amount (DH_cfg,
-                               "donau",
-                               "STEFAN_LIN",
-                               &DH_stefan_lin))
-  {
-    GNUNET_assert (GNUNET_OK ==
-                   TALER_amount_set_zero (DH_currency,
-                                          &DH_stefan_lin));
-  }
-
-  if (0 != strcmp (DH_currency,
-                   DH_aml_threshold.currency))
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Amount in section `donau' under `AML_THRESHOLD' uses the 
wrong currency!\n");
-    return GNUNET_SYSERR;
-  }
-  DH_enable_rewards
-    = GNUNET_CONFIGURATION_get_value_yesno (
-        DH_cfg,
-        "donau",
-        "ENABLE_REWARDS");
-  if (GNUNET_SYSERR == DH_enable_rewards)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Need YES or NO in section `donau' under `ENABLE_REWARDS'\n");
-    return GNUNET_SYSERR;
-  }
+  // if (GNUNET_OK !=
+  //     TALER_config_get_amount (DH_cfg,
+  //                              "donau",
+  //                              "STEFAN_ABS",
+  //                              &DH_stefan_abs))
+  // {
+  //   GNUNET_assert (GNUNET_OK ==
+  //                  TALER_amount_set_zero (DH_currency,
+  //                                         &DH_stefan_abs));
+  // }
+  // if (GNUNET_OK !=
+  //     TALER_config_get_amount (DH_cfg,
+  //                              "donau",
+  //                              "STEFAN_LOG",
+  //                              &DH_stefan_log))
+  // {
+  //   GNUNET_assert (GNUNET_OK ==
+  //                  TALER_amount_set_zero (DH_currency,
+  //                                         &DH_stefan_log));
+  // }
+  // if (GNUNET_OK !=
+  //     TALER_config_get_amount (DH_cfg,
+  //                              "donau",
+  //                              "STEFAN_LIN",
+  //                              &DH_stefan_lin))
+  // {
+  //   GNUNET_assert (GNUNET_OK ==
+  //                  TALER_amount_set_zero (DH_currency,
+  //                                         &DH_stefan_lin));
+  // }
+
+  // if (0 != strcmp (DH_currency,
+  //                  DH_aml_threshold.currency))
+  // {
+  //   GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+  //               "Amount in section `donau' under `AML_THRESHOLD' uses the 
wrong currency!\n");
+  //   return GNUNET_SYSERR;
+  // }
+  // DH_enable_rewards
+  //   = GNUNET_CONFIGURATION_get_value_yesno (
+  //       DH_cfg,
+  //       "donau",
+  //       "ENABLE_REWARDS");
+  // if (GNUNET_SYSERR == DH_enable_rewards)
+  // {
+  //   GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+  //               "Need YES or NO in section `donau' under 
`ENABLE_REWARDS'\n");
+  //   return GNUNET_SYSERR;
+  // }
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (DH_cfg,
                                              "donau",
@@ -955,59 +955,59 @@ donau_serve_process_config (void)
     return GNUNET_SYSERR;
   }
 
-  {
-    char *master_public_key_str;
-
-    if (GNUNET_OK !=
-        GNUNET_CONFIGURATION_get_value_string (DH_cfg,
-                                               "donau",
-                                               "MASTER_PUBLIC_KEY",
-                                               &master_public_key_str))
-    {
-      GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                                 "donau",
-                                 "MASTER_PUBLIC_KEY");
-      return GNUNET_SYSERR;
-    }
-    if (GNUNET_OK !=
-        GNUNET_CRYPTO_eddsa_public_key_from_string (master_public_key_str,
-                                                    strlen (
-                                                      master_public_key_str),
-                                                    &DH_master_public_key.
-                                                    eddsa_pub))
-    {
-      GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
-                                 "donau",
-                                 "MASTER_PUBLIC_KEY",
-                                 "invalid base32 encoding for a master public 
key");
-      GNUNET_free (master_public_key_str);
-      return GNUNET_SYSERR;
-    }
-    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                "Launching donau with public key `%s'...\n",
-                master_public_key_str);
-    GNUNET_free (master_public_key_str);
-  }
-
-  {
-    char *attr_enc_key_str;
-
-    if (GNUNET_OK !=
-        GNUNET_CONFIGURATION_get_value_string (DH_cfg,
-                                               "donau",
-                                               "ATTRIBUTE_ENCRYPTION_KEY",
-                                               &attr_enc_key_str))
-    {
-      GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
-                                 "donau",
-                                 "ATTRIBUTE_ENCRYPTION_KEY");
-      return GNUNET_SYSERR;
-    }
-    GNUNET_CRYPTO_hash (attr_enc_key_str,
-                        strlen (attr_enc_key_str),
-                        &DH_attribute_key.hash);
-    GNUNET_free (attr_enc_key_str);
-  }
+  // {
+  //   char *master_public_key_str;
+
+  //   if (GNUNET_OK !=
+  //       GNUNET_CONFIGURATION_get_value_string (DH_cfg,
+  //                                              "donau",
+  //                                              "MASTER_PUBLIC_KEY",
+  //                                              &master_public_key_str))
+  //   {
+  //     GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+  //                                "donau",
+  //                                "MASTER_PUBLIC_KEY");
+  //     return GNUNET_SYSERR;
+  //   }
+  //   if (GNUNET_OK !=
+  //       GNUNET_CRYPTO_eddsa_public_key_from_string (master_public_key_str,
+  //                                                   strlen (
+  //                                                     
master_public_key_str),
+  //                                                   &DH_master_public_key.
+  //                                                   eddsa_pub))
+  //   {
+  //     GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+  //                                "donau",
+  //                                "MASTER_PUBLIC_KEY",
+  //                                "invalid base32 encoding for a master 
public key");
+  //     GNUNET_free (master_public_key_str);
+  //     return GNUNET_SYSERR;
+  //   }
+  //   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+  //               "Launching donau with public key `%s'...\n",
+  //               master_public_key_str);
+  //   GNUNET_free (master_public_key_str);
+  // }
+
+  // {
+  //   char *attr_enc_key_str;
+
+  //   if (GNUNET_OK !=
+  //       GNUNET_CONFIGURATION_get_value_string (DH_cfg,
+  //                                              "donau",
+  //                                              "ATTRIBUTE_ENCRYPTION_KEY",
+  //                                              &attr_enc_key_str))
+  //   {
+  //     GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+  //                                "donau",
+  //                                "ATTRIBUTE_ENCRYPTION_KEY");
+  //     return GNUNET_SYSERR;
+  //   }
+  //   GNUNET_CRYPTO_hash (attr_enc_key_str,
+  //                       strlen (attr_enc_key_str),
+  //                       &DH_attribute_key.hash);
+  //   GNUNET_free (attr_enc_key_str);
+  // }
 
   for (unsigned int i = 0; i<MAX_DB_RETRIES; i++)
   {
diff --git a/src/testing/test_donau_api.conf b/src/testing/test_donau_api.conf
index 45cb10e..c9071ef 100644
--- a/src/testing/test_donau_api.conf
+++ b/src/testing/test_donau_api.conf
@@ -16,16 +16,21 @@ TERMS_ETAG = tos
 PRIVACY_ETAG = 0
 AML_THRESHOLD = EUR:1000000
 PORT = 8081
-MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 DB = postgres
 BASE_URL = "http://localhost:8081/";
 SERVE = tcp
 EXPIRE_SHARD_SIZE ="300 ms"
 EXPIRE_IDLE_SLEEP_INTERVAL ="1 s"
+MAX_KEYS_CACHING = forever
+KYC_AML_TRIGGER = false
+ENABLE_REWARDS = NO
 
 [donaudb-postgres]
 CONFIG = "postgres:///talercheck"
 
+[donaudb]
+IDLE_RESERVE_EXPIRATION_TIME = 0 s
+
 [taler-donau-secmod-cs]
 LOOKAHEAD_SIGN = "24 days"
 
@@ -56,3 +61,4 @@ WIRE_GATEWAY_AUTH_METHOD = basic
 USERNAME = Donau
 PASSWORD = x
 WIRE_GATEWAY_URL = "http://localhost:8082/2/";
+

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