summaryrefslogtreecommitdiff
path: root/src/util/taler-exchange-secmod-rsa.c
diff options
context:
space:
mode:
authorCasaburi Johannes <johannes.casaburi@students.bfh.ch>2024-01-05 15:31:54 +0100
committerCasaburi Johannes <johannes.casaburi@students.bfh.ch>2024-01-05 15:31:54 +0100
commit94914b0e2e559d38c19c580e96f881eb329bc82d (patch)
tree4933faf56808ec04730e0fc4bd86f621c0894070 /src/util/taler-exchange-secmod-rsa.c
parentdc742246151fa5a0fa3f2150e130d5122008cfae (diff)
downloadexchange-94914b0e2e559d38c19c580e96f881eb329bc82d.tar.gz
exchange-94914b0e2e559d38c19c580e96f881eb329bc82d.tar.bz2
exchange-94914b0e2e559d38c19c580e96f881eb329bc82d.zip
add option -s to the RSA and EdDSA secmod helper for DONAU to use a different path
Diffstat (limited to 'src/util/taler-exchange-secmod-rsa.c')
-rw-r--r--src/util/taler-exchange-secmod-rsa.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c
index b10e7c637..9591c308b 100644
--- a/src/util/taler-exchange-secmod-rsa.c
+++ b/src/util/taler-exchange-secmod-rsa.c
@@ -308,6 +308,13 @@ static struct GNUNET_TIME_Timestamp now_tmp;
static char *keydir;
/**
+ * Name of the configuration section prefix to use. Usually either "taler" or
+ * "donau". The actual configuration section will then be
+ * "$SECTION-exchange-secmod-cs".
+ */
+static const char *section = "taler";
+
+/**
* How much should coin creation (@e duration_withdraw) duration overlap
* with the next denomination? Basically, the starting time of two
* denominations is always @e duration_withdraw - #overlap_duration apart.
@@ -1943,6 +1950,7 @@ run (void *cls,
.updater = rsa_update_client_keys,
.init = rsa_client_init
};
+ char *secname;
(void) cls;
(void) args;
@@ -1957,18 +1965,23 @@ run (void *cls,
/* get current time again, we may be timetraveling! */
now = GNUNET_TIME_timestamp_get ();
}
+ GNUNET_asprintf (&secname,
+ "%s-exchange-secmod-rsa",
+ section);
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (cfg,
- "taler-exchange-secmod-rsa",
+ secname,
"KEY_DIR",
&keydir))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "taler-exchange-secmod-rsa",
+ secname,
"KEY_DIR");
+ GNUNET_free (secname);
global_ret = EXIT_NOTCONFIGURED;
return;
}
+ GNUNET_free (secname);
if (GNUNET_OK !=
load_durations (cfg))
{
@@ -2051,6 +2064,11 @@ main (int argc,
char **argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_string ('s',
+ "section",
+ "SECTION",
+ "name of the configuration section prefix to use, default is 'taler'",
+ &section),
GNUNET_GETOPT_option_timetravel ('T',
"timetravel"),
GNUNET_GETOPT_option_timestamp ('t',