[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] 02/02: REVOCATION_DIR is long obsolete, KEYDIR was rena
From: |
gnunet |
Subject: |
[taler-exchange] 02/02: REVOCATION_DIR is long obsolete, KEYDIR was renamed to KEY_DIR and is in another section |
Date: |
Fri, 30 Jul 2021 17:31:25 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
commit af9830453ec3cad428277995f4134f941fbc17b5
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jul 30 17:31:18 2021 +0200
REVOCATION_DIR is long obsolete, KEYDIR was renamed to KEY_DIR and is in
another section
---
src/auditor/generate-auditor-basedb.conf | 2 --
src/testing/testing_api_helpers_exchange.c | 51 +++++++++++++++++-------------
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/src/auditor/generate-auditor-basedb.conf
b/src/auditor/generate-auditor-basedb.conf
index d3ded7bd..21e40c32 100644
--- a/src/auditor/generate-auditor-basedb.conf
+++ b/src/auditor/generate-auditor-basedb.conf
@@ -1,6 +1,4 @@
[exchange]
-KEYDIR = ${TALER_DATA_HOME}/exchange/live-keys/
-REVOCATION_DIR = ${TALER_DATA_HOME}/exchange/revocations/
MAX_KEYS_CACHING = forever
DB = postgres
MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
diff --git a/src/testing/testing_api_helpers_exchange.c
b/src/testing/testing_api_helpers_exchange.c
index 3fa2d416..bc301d77 100644
--- a/src/testing/testing_api_helpers_exchange.c
+++ b/src/testing/testing_api_helpers_exchange.c
@@ -41,21 +41,27 @@ TALER_TESTING_cleanup_files (const char *config_name)
}
-int
-TALER_TESTING_cleanup_files_cfg (void *cls,
- const struct GNUNET_CONFIGURATION_Handle *cfg)
+/**
+ * Remove @a option directory from @a section in @a cfg.
+ *
+ * @return #GNUNET_OK on success
+ */
+static enum GNUNET_GenericReturnValue
+remove_dir (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option)
{
char *dir;
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (cfg,
- "exchange",
- "KEYDIR",
+ section,
+ option,
&dir))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
- "KEYDIR");
+ section,
+ option);
return GNUNET_SYSERR;
}
if (GNUNET_YES ==
@@ -64,23 +70,24 @@ TALER_TESTING_cleanup_files_cfg (void *cls,
GNUNET_break (GNUNET_OK ==
GNUNET_DISK_directory_remove (dir));
GNUNET_free (dir);
+ return GNUNET_OK;
+}
+
+
+int
+TALER_TESTING_cleanup_files_cfg (void *cls,
+ const struct GNUNET_CONFIGURATION_Handle *cfg)
+{
if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- "exchange",
- "REVOCATION_DIR",
- &dir))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "exchange",
- "REVOCATION_DIR");
+ remove_dir (cfg,
+ "taler-exchange-secmod-eddsa",
+ "KEY_DIR"))
+ return GNUNET_SYSERR;
+ if (GNUNET_OK !=
+ remove_dir (cfg,
+ "taler-exchange-secmod-rsa",
+ "KEY_DIR"))
return GNUNET_SYSERR;
- }
- if (GNUNET_YES ==
- GNUNET_DISK_directory_test (dir,
- GNUNET_NO))
- GNUNET_break (GNUNET_OK ==
- GNUNET_DISK_directory_remove (dir));
- GNUNET_free (dir);
return GNUNET_OK;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.