add KYC_AML_TRIGGER option (not implemented)

This commit is contained in:
Christian Grothoff 2023-05-16 14:17:33 +02:00
parent 30b953ff0f
commit e371d76cfe
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 34 additions and 10 deletions

View File

@ -153,6 +153,11 @@ struct TALER_EXCHANGEDB_Plugin *TEH_plugin;
*/
char *TEH_currency;
/**
* Name of the KYC-AML-trigger evaluation binary.
*/
char *TEH_kyc_aml_trigger;
/**
* Option set to #GNUNET_YES if tipping is enabled.
*/
@ -1849,6 +1854,17 @@ exchange_serve_process_config (void)
"valid relative time expected");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (TEH_cfg,
"exchange",
"KYC_AML_TRIGGER",
&TEH_kyc_aml_trigger))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"exchange",
"KYC_AML_TRIGGER");
return GNUNET_SYSERR;
}
if (GNUNET_OK !=
TALER_config_get_currency (TEH_cfg,
&TEH_currency))

View File

@ -102,6 +102,11 @@ extern struct TALER_EXCHANGEDB_Plugin *TEH_plugin;
*/
extern char *TEH_currency;
/**
* Name of the KYC-AML-trigger evaluation binary.
*/
extern char *TEH_kyc_aml_trigger;
/**
* What is the largest amount we allow a peer to
* merge into a reserve before always triggering

View File

@ -251,7 +251,7 @@ child_done_cb (void *cls,
long unsigned int exit_code)
{
struct TALER_JSON_ExternalConversion *ec = cls;
json_t *j;
json_t *j = NULL;
json_error_t err;
ec->cwh = NULL;
@ -269,16 +269,19 @@ child_done_cb (void *cls,
}
GNUNET_OS_process_destroy (ec->helper);
ec->helper = NULL;
j = json_loadb (ec->read_buf,
ec->read_pos,
JSON_REJECT_DUPLICATES,
&err);
if (NULL == j)
if (0 != ec->read_pos)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to parse JSON from helper at %d: %s\n",
err.position,
err.text);
j = json_loadb (ec->read_buf,
ec->read_pos,
JSON_REJECT_DUPLICATES,
&err);
if (NULL == j)
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Failed to parse JSON from helper at %d: %s\n",
err.position,
err.text);
}
}
ec->cb (ec->cb_cls,
type,