diff options
Diffstat (limited to 'src/kyclogic')
-rw-r--r-- | src/kyclogic/kyclogic_api.c | 26 | ||||
-rwxr-xr-x | src/kyclogic/taler-exchange-helper-measure-freeze | 1 | ||||
-rwxr-xr-x | src/kyclogic/taler-exchange-helper-measure-test-oauth | 1 |
3 files changed, 25 insertions, 3 deletions
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c index f3e244af0..79e0ab6cc 100644 --- a/src/kyclogic/kyclogic_api.c +++ b/src/kyclogic/kyclogic_api.c @@ -1237,6 +1237,13 @@ add_check (const struct GNUNET_CONFIGURATION_Handle *cfg, char *outputs = NULL; char *fallback = NULL; + if (0 == strcasecmp (§ion[strlen ("kyc-check-")], + "SKIP")) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "The kyc-check-skip section must not exist, 'skip' is reserved name for a build-in check\n"); + return GNUNET_SYSERR; + } GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Parsing KYC check %s\n", section); @@ -1811,9 +1818,7 @@ add_measure (const struct GNUNET_CONFIGURATION_Handle *cfg, "CHECK_NAME", &check_name)) { - GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - section, - "CHECK_NAME"); + check_name = GNUNET_strdup ("SKIP"); goto fail; } if (GNUNET_OK != @@ -1959,6 +1964,18 @@ TALER_KYCLOGIC_kyc_init (const struct GNUNET_CONFIGURATION_Handle *cfg) default_rules.num_kyc_rules, sizeof (struct TALER_KYCLOGIC_KycRule *), &sort_by_timeframe); + + { + const struct TALER_KYCLOGIC_KycCheck *check; + + check = find_check ("default"); + if (NULL == check) + { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + "A 'default' check should be defined\n"); + } + } + for (unsigned int i=0; i<default_rules.num_kyc_rules; i++) { const struct TALER_KYCLOGIC_KycRule *rule @@ -1989,6 +2006,9 @@ TALER_KYCLOGIC_kyc_init (const struct GNUNET_CONFIGURATION_Handle *cfg) const struct TALER_KYCLOGIC_KycCheck *check; const struct TALER_KYCLOGIC_AmlProgram *program; + if (0 == strcasecmp (measure->check_name, + "SKIP")) + continue; check = find_check (measure->check_name); if (NULL == check) { diff --git a/src/kyclogic/taler-exchange-helper-measure-freeze b/src/kyclogic/taler-exchange-helper-measure-freeze index 8f6cb84c9..1a8a43b55 100755 --- a/src/kyclogic/taler-exchange-helper-measure-freeze +++ b/src/kyclogic/taler-exchange-helper-measure-freeze @@ -48,6 +48,7 @@ jq -n \ --arg expiration "$EXPIRATION" \ '{ "to_investigate": true, "new_rules" : { + "new_check" : "info-frozen", "expiration_time" : { "t_s": $expiration }, "rules" : [ { diff --git a/src/kyclogic/taler-exchange-helper-measure-test-oauth b/src/kyclogic/taler-exchange-helper-measure-test-oauth index e127ae52c..1f5e1530d 100755 --- a/src/kyclogic/taler-exchange-helper-measure-test-oauth +++ b/src/kyclogic/taler-exchange-helper-measure-test-oauth @@ -64,6 +64,7 @@ jq -n \ --arg expiration "$EXPIRATION" \ '{ "to_investigate": false, "new_rules" : { + "new_check" : "info-oauth-test-passed", "expiration_time" : { "t_s": $expiration }, "rules" : [ { "operation_type": "CLOSE", |