simplify further

This commit is contained in:
Christian Grothoff 2020-12-17 15:46:52 +01:00
parent b74612fc33
commit f930a8c9d0
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
4 changed files with 13 additions and 43 deletions

View File

@ -752,10 +752,10 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
strlen (master_public_key_str), strlen (master_public_key_str),
&TALER_ARL_master_pub.eddsa_pub)) &TALER_ARL_master_pub.eddsa_pub))
{ {
GNUNET_log_config_malformed (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
"exchange", "exchange",
"MASTER_PUBLIC_KEY", "MASTER_PUBLIC_KEY",
"invalid key"); "invalid key");
GNUNET_free (master_public_key_str); GNUNET_free (master_public_key_str);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }
@ -772,7 +772,7 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
char *fn; char *fn;
if (GNUNET_OK == if (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_filename (kcfg, GNUNET_CONFIGURATION_get_value_filename (c,
"auditor", "auditor",
"AUDITOR_PRIV_FILE", "AUDITOR_PRIV_FILE",
&fn)) &fn))
@ -785,7 +785,7 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
&auditor_priv.eddsa_priv)) &auditor_priv.eddsa_priv))
{ {
GNUNET_CRYPTO_eddsa_key_get_public (&auditor_priv.eddsa_priv, GNUNET_CRYPTO_eddsa_key_get_public (&auditor_priv.eddsa_priv,
&auditor_pub.eddsa_pub); &TALER_ARL_auditor_pub.eddsa_pub);
} }
GNUNET_free (fn); GNUNET_free (fn);
} }
@ -797,7 +797,7 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
char *auditor_public_key_str; char *auditor_public_key_str;
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (TALER_ARL_cfg, GNUNET_CONFIGURATION_get_value_string (c,
"auditor", "auditor",
"PUBLIC_KEY", "PUBLIC_KEY",
&auditor_public_key_str)) &auditor_public_key_str))
@ -810,13 +810,13 @@ TALER_ARL_init (const struct GNUNET_CONFIGURATION_Handle *c)
if (GNUNET_OK != if (GNUNET_OK !=
GNUNET_CRYPTO_eddsa_public_key_from_string ( GNUNET_CRYPTO_eddsa_public_key_from_string (
auditor_public_key_str, auditor_public_key_str,
strlen (auditor_master_public_key_str), strlen (auditor_public_key_str),
&TALER_ARL_auditor_pub.eddsa_pub)) &TALER_ARL_auditor_pub.eddsa_pub))
{ {
GNUNET_log_config_malformed (GNUNET_ERROR_TYPE_ERROR, GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR,
"auditor", "auditor",
"PUBLIC_KEY", "PUBLIC_KEY",
"invalid key"); "invalid key");
GNUNET_free (auditor_public_key_str); GNUNET_free (auditor_public_key_str);
return GNUNET_SYSERR; return GNUNET_SYSERR;
} }

View File

@ -2618,14 +2618,6 @@ do_show (char *const *args)
} }
GNUNET_JSON_parse_free (spec); GNUNET_JSON_parse_free (spec);
} }
/* do NOT consume input if next argument is '-' */
if ( (NULL != args[0]) &&
(0 == strcmp ("-",
args[0])) )
{
next (args + 1);
return;
}
json_decref (in); json_decref (in);
in = NULL; in = NULL;
next (args); next (args);
@ -3053,7 +3045,7 @@ work (void *cls)
{ {
.name = "wire-fee", .name = "wire-fee",
.help = .help =
"sign wire fees for the given year (year, wire fee and closing fee must be given as arguments)", "sign wire fees for the given year (year, wire method, wire fee and closing fee must be given as arguments)",
.cb = &do_set_wire_fee .cb = &do_set_wire_fee
}, },
{ {

View File

@ -76,7 +76,6 @@ check_for_account (void *cls,
struct FindAccountContext *ctx = cls; struct FindAccountContext *ctx = cls;
char *method; char *method;
char *payto_uri; char *payto_uri;
char *wire_response_filename;
if (0 != strncasecmp (section, if (0 != strncasecmp (section,
"exchange-account-", "exchange-account-",
@ -104,18 +103,10 @@ check_for_account (void *cls,
GNUNET_free (payto_uri); GNUNET_free (payto_uri);
return; return;
} }
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_filename (ctx->cfg,
section,
"WIRE_RESPONSE",
&wire_response_filename))
wire_response_filename = NULL;
{ {
struct TALER_EXCHANGEDB_AccountInfo ai = { struct TALER_EXCHANGEDB_AccountInfo ai = {
.section_name = section, .section_name = section,
.method = method, .method = method,
.payto_uri = payto_uri,
.wire_response_filename = wire_response_filename,
.debit_enabled = (GNUNET_YES == .debit_enabled = (GNUNET_YES ==
GNUNET_CONFIGURATION_get_value_yesno ( GNUNET_CONFIGURATION_get_value_yesno (
ctx->cfg, ctx->cfg,
@ -130,9 +121,7 @@ check_for_account (void *cls,
ctx->cb (ctx->cb_cls, ctx->cb (ctx->cb_cls,
&ai); &ai);
} }
GNUNET_free (payto_uri);
GNUNET_free (method); GNUNET_free (method);
GNUNET_free (wire_response_filename);
} }

View File

@ -63,17 +63,6 @@ struct TALER_EXCHANGEDB_AccountInfo
*/ */
const char *method; const char *method;
/**
* payto://-URL of the account.
*/
const char *payto_uri;
/**
* Filename containing the signed /wire response, or NULL
* if not given.
*/
const char *wire_response_filename;
/** /**
* #GNUNET_YES if this account is enabed to be debited * #GNUNET_YES if this account is enabed to be debited
* by the taler-exchange-aggregator. * by the taler-exchange-aggregator.