exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit f754a68b806f0e3c700995f28dc4b7a415dc07a1
parent 76ba134c6175b2ea11b80198b6c338d65d3f7be8
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  7 Aug 2026 11:22:48 +0200

also support cprefix for secmod-cs

Diffstat:
Msrc/util/secmod_cs.c | 20++++++++++++--------
Msrc/util/taler-exchange-secmod-cs.c | 3++-
2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/util/secmod_cs.c b/src/util/secmod_cs.c @@ -2206,6 +2206,12 @@ struct LoadContext struct GNUNET_TIME_Timestamp t; /** + * Configuration section prefix to use for denomination settings. + * "coin_" for the exchange, "doco_" for Donau. + */ + const char *cprefix; + + /** * Status, to be set to #GNUNET_SYSERR on failure */ enum GNUNET_GenericReturnValue ret; @@ -2227,12 +2233,9 @@ load_denominations (void *cls, struct Denomination *denom; char *cipher; - if ( (0 != strncasecmp (denomination_alias, - "coin_", - strlen ("coin_"))) && - (0 != strncasecmp (denomination_alias, - "coin-", - strlen ("coin-"))) ) + if (0 != strncasecmp (denomination_alias, + ctx->cprefix, + strlen (ctx->cprefix))) return; /* not a denomination type definition */ if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (ctx->cfg, @@ -2433,7 +2436,8 @@ TALER_SECMOD_cs_run (void *cls, struct LoadContext lc = { .cfg = cfg, .ret = GNUNET_OK, - .t = opt->global_now + .t = opt->global_now, + .cprefix = opt->cprefix }; bool wake = true; @@ -2455,7 +2459,7 @@ TALER_SECMOD_cs_run (void *cls, { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "No CS denominations configured. Make sure section names start with `%s' if you are using CS!\n", - opt->section); + opt->cprefix); TES_wake_clients (); return; } diff --git a/src/util/taler-exchange-secmod-cs.c b/src/util/taler-exchange-secmod-cs.c @@ -47,7 +47,8 @@ main (int argc, { struct TALER_SECMOD_Options opts = { .max_workers = 16, - .section = "taler-exchange" + .section = "taler-exchange", + .cprefix = "coin_" }; struct GNUNET_GETOPT_CommandLineOption options[] = { TALER_SECMOD_OPTIONS (&opts),