commit 13151cdcda66d31efbee8ea51d9cd8e674d9f7ca
parent 6692552b50cd3e8ed21a7039a5edfdd73e92755f
Author: Matyja Lukas Adam <lukas.matyja@students.bfh.ch>
Date: Wed, 10 Apr 2024 11:01:42 +0200
Merge remote-tracking branch 'refs/remotes/origin/master'
Diffstat:
7 files changed, 27 insertions(+), 36 deletions(-)
diff --git a/doc/flows/presentation/donau_presentation_project2.pdf b/doc/flows/presentation/donau_presentation_project2.pdf
Binary files differ.
diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c
@@ -867,6 +867,8 @@ helper_esign_cb (
{
struct SigningKey *sk;
struct GNUNET_PeerIdentity pid;
+ unsigned long long expire_legal;
+
/* need to "cast" because secmod works with TALER_ExchangePublicKeyP */
struct DONAU_DonauPublicKeyP donau_pubkey = {
.eddsa_pub = donau_pub->eddsa_pub
@@ -898,13 +900,26 @@ helper_esign_cb (
= GNUNET_TIME_absolute_to_timestamp (
GNUNET_TIME_absolute_add (start_time.abs_time,
validity_duration));
+
+ if (GNUNET_OK !=
+ GNUNET_CONFIGURATION_get_value_number (DH_cfg,
+ "donau",
+ "EXPIRE_LEGAL",
+ &expire_legal))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Need EXPIRE_LEGAL in section `donau'\n");
+ GNUNET_SCHEDULER_shutdown ();
+ DH_global_ret = EXIT_FAILURE;
+ return;
+ }
sk->meta.expire_legal
- /* FIXME: make this configurable, not fixed to 10 years */
= GNUNET_TIME_absolute_to_timestamp (
GNUNET_TIME_absolute_add (start_time.abs_time,
GNUNET_TIME_relative_multiply (
GNUNET_TIME_UNIT_YEARS,
- 10)));
+ expire_legal)));
+
GNUNET_assert (
GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_put (
diff --git a/src/donau/donau.conf b/src/donau/donau.conf
@@ -50,27 +50,6 @@ PORT = 8081
# transfers to enable tracking.
BASE_URL = http://localhost:8081/
-# How long should the aggregator sleep if it has nothing to do?
-AGGREGATOR_IDLE_SLEEP_INTERVAL = 60 s
-
-# FIXME: document!
-ROUTER_IDLE_SLEEP_INTERVAL = 60 s
-
-# How long should the closer tool
-# sleep if it has nothing to do?
-CLOSER_IDLE_SLEEP_INTERVAL = 60 s
-
-# Values of 0 or above 2^31 disable sharding, which
-# is a sane default for most use-cases.
-# When changing this value, you MUST stop all
-# aggregators and manually run
-#
-# $ taler-donau-dbinit -s
-#
-# against the donau's database. Otherwise, the
-# aggregation logic will break badly!
-ROUTER_SHARD_SIZE = 2147483648
-
# Directory with our terms of service.
TERMS_DIR = $TALER_DATA_HOME/terms/
diff --git a/src/donau/test_donau_httpd.conf b/src/donau/test_donau_httpd.conf
@@ -41,6 +41,9 @@ MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
# How to access our database
DB = postgres
+# Legal expiry for signing keys in years
+EXPIRE_LEGAL = 5
+
[donaudb]
# After how long do we close idle reserves? The donau
diff --git a/src/donau/test_donau_unix.conf b/src/donau/test_donau_unix.conf
@@ -25,14 +25,6 @@ PRIVACY_DIR = ../../contrib/pp
# Etag / filename for the privacy policy.
PRIVACY_ETAG = 0
-# MAX_REQUESTS = 2
-# how long is one signkey valid?
-SIGNKEY_DURATION = 4 weeks
-
-# how long do we generate denomination and signing keys
-# ahead of time?
-LOOKAHEAD_SIGN = 32 weeks 1 day
-
# HTTP port the donau listens to (we want to use UNIX domain sockets,
# so we use a port that just won't work on GNU/Linux without root rights)
PORT = 999
diff --git a/src/testing/test_donau_api.c b/src/testing/test_donau_api.c
@@ -91,11 +91,12 @@ run (void *cls,
TALER_TESTING_cmd_charities_get ("get-charities",
&bearer,
MHD_HTTP_OK),
- TALER_TESTING_cmd_issue_receipts ("issue-receipts",
- "post-charity",
- 2024,
- 3, // number of budi key pairs
- MHD_HTTP_CREATED),
+ // FIXME
+ // TALER_TESTING_cmd_issue_receipts ("issue-receipts",
+ // "post-charity",
+ // 2024,
+ // 3, // number of budi key pairs
+ // MHD_HTTP_CREATED),
TALER_TESTING_cmd_charity_delete ("delete-charity",
"post-charity", // cmd trait reference
&bearer,
diff --git a/src/testing/test_donau_api.conf b/src/testing/test_donau_api.conf
@@ -20,6 +20,7 @@ DOMAIN = "Bern"
BASE_URL = "http://localhost:8080/"
SERVE = tcp
EXPIRE_IDLE_SLEEP_INTERVAL ="1 s"
+EXPIRE_LEGAL = 5
#MAX_KEYS_CACHING = forever
[donaudb-postgres]