summaryrefslogtreecommitdiff
path: root/src/util/crypto_helper_denom.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-17 20:31:08 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-17 20:31:08 +0100
commitf76888378cb6f3912a384c59d1d8a8dc1b603e28 (patch)
treea9f1aed55b04bc8a2dd7f01805b5c43a67e11c1d /src/util/crypto_helper_denom.c
parentcc74bf311d863eef3e7af5b9b59fb311af5f50d6 (diff)
downloadexchange-f76888378cb6f3912a384c59d1d8a8dc1b603e28.tar.gz
exchange-f76888378cb6f3912a384c59d1d8a8dc1b603e28.tar.bz2
exchange-f76888378cb6f3912a384c59d1d8a8dc1b603e28.zip
-fix crypto_helper FTBFS
Diffstat (limited to 'src/util/crypto_helper_denom.c')
-rw-r--r--src/util/crypto_helper_denom.c68
1 files changed, 12 insertions, 56 deletions
diff --git a/src/util/crypto_helper_denom.c b/src/util/crypto_helper_denom.c
index 6490184ef..cce5af635 100644
--- a/src/util/crypto_helper_denom.c
+++ b/src/util/crypto_helper_denom.c
@@ -238,63 +238,19 @@ TALER_CRYPTO_helper_denom_connect (
sizeof (dh->sa.sun_path) - 1);
GNUNET_free (unixpath);
dh->sock = -1;
+ /* Extract the age groups from the config, if the extension has been set,
+ * and serialize them into the age mask
+ */
+ if (GNUNET_OK !=
+ TALER_get_age_mask (cfg, &dh->age_mask))
{
- char *tmpdir;
- char *template;
-
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_filename (cfg,
- "taler-exchange-secmod-rsa",
- "CLIENT_DIR",
- &tmpdir))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "taler-exchange-secmod-rsa",
- "CLIENT_DIR");
- return NULL;
- }
- GNUNET_asprintf (&template,
- "%s/cli",
- tmpdir);
- /* We expect the service to create the client directory */
- if (GNUNET_OK !=
- GNUNET_DISK_directory_test (tmpdir,
- GNUNET_YES))
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unable to read secmod client directory (%s)\n",
- tmpdir);
- GNUNET_free (dh);
- GNUNET_free (template);
- GNUNET_free (tmpdir);
- return NULL;
- }
- GNUNET_free (tmpdir);
- dh->template = template;
- if (strlen (template) >= sizeof (dh->sa.sun_path))
- {
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
- "PATHS",
- "TALER_RUNTIME_DIR",
- "path too long");
- TALER_CRYPTO_helper_denom_disconnect (dh);
- return NULL;
- }
-
- /* Extract the age groups from the config, if the extension has been set,
- * and serialize them into the age mask
- */
- if (GNUNET_OK !=
- TALER_get_age_mask (cfg, &dh->age_mask))
- {
- /* FIXME: maybe more specific error? */
- GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
- "extensions", /* FIXME: right section etc? */
- "age-restriction",
- "invalid age groups");
- TALER_CRYPTO_helper_denom_disconnect (dh);
- return NULL;
- }
+ /* FIXME: maybe more specific error? */
+ GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
+ "extensions", /* FIXME: right section etc? */
+ "age-restriction",
+ "invalid age groups");
+ TALER_CRYPTO_helper_denom_disconnect (dh);
+ return NULL;
}
TALER_CRYPTO_helper_denom_poll (dh);
return dh;