diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-14 19:53:39 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-14 19:53:39 +0200 |
commit | c15667b38d3d2688472aeff7578116ac940150aa (patch) | |
tree | 316e47b0ae17b5145c1902955bd0064a5b15278e | |
parent | c573ebd2fd16c113e175e699d3761d8f7ad9322e (diff) |
implement TALER_KYCLOGIC_lookup_checks
-rw-r--r-- | src/kyclogic/kyclogic_api.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c index f583fd225..186799dbb 100644 --- a/src/kyclogic/kyclogic_api.c +++ b/src/kyclogic/kyclogic_api.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2022 Taler Systems SA + Copyright (C) 2022-2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -1487,7 +1487,25 @@ TALER_KYCLOGIC_lookup_checks (const char *section_name, { *num_checks = 0; *provided_checks = NULL; - GNUNET_break (0); // FIXME: NOT implemented! + for (unsigned int i = 0; i<num_kyc_providers; i++) + { + struct TALER_KYCLOGIC_KycProvider *kp = kyc_providers[i]; + + if (0 != + strcasecmp (section_name, + kp->provider_section_name)) + continue; + *num_checks = kp->num_checks; + if (0 != kp->num_checks) + { + char **pc = GNUNET_new_array (kp->num_checks, + char *); + for (unsigned int i = 0; i<kp->num_checks; i++) + pc[i] = GNUNET_strdup (kp->provided_checks[i]->name); + *provided_checks = pc; + } + return; + } } |