diff options
Diffstat (limited to 'src/util/taler-exchange-secmod-rsa.c')
-rw-r--r-- | src/util/taler-exchange-secmod-rsa.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c index 43387929..fef20524 100644 --- a/src/util/taler-exchange-secmod-rsa.c +++ b/src/util/taler-exchange-secmod-rsa.c @@ -41,6 +41,7 @@ #include "secmod_common.h" #include <poll.h> +#define TALER_CFG_CIPHER_LEN 3 /** * Information we keep per denomination. @@ -1340,6 +1341,7 @@ load_denominations (void *cls, struct LoadContext *ctx = cls; struct Denomination *denom; bool wake = true; + char *cipher; if ( (0 != strncasecmp (denomination_alias, "coin_", @@ -1348,6 +1350,25 @@ load_denominations (void *cls, "coin-", strlen ("coin-"))) ) return; /* not a denomination type definition */ + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (ctx->cfg, + denomination_alias, + "CIPHER", + &cipher)) + { + GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, + denomination_alias, + "CIPHER"); + return; + } + if (strlen (cipher) > TALER_CFG_CIPHER_LEN) + { + return; /* Cipher length must be smaller than TALER_CFG_CIPHER_LEN */ + } + if (0 != strcmp (cipher, "RSA")) + { + return; /* Ignore denominations of other types than CS */ + } denom = GNUNET_new (struct Denomination); if (GNUNET_OK != parse_denomination_cfg (ctx->cfg, |