commit 90292e199af444f2f266924ed60b273f20c913a0 parent 9197bd92f89e11cc137df0b8b841fc157c710fa6 Author: Christian Grothoff <christian@grothoff.org> Date: Wed, 15 Apr 2026 22:19:53 +0200 separate internal headers better from external headers Diffstat:
478 files changed, 2562 insertions(+), 2647 deletions(-)
diff --git a/src/auditor/report-lib.h b/src/auditor/report-lib.h @@ -22,8 +22,8 @@ #define REPORT_LIB_H #include <gnunet/gnunet_util_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" diff --git a/src/auditor/taler-auditor-dbinit.c b/src/auditor/taler-auditor-dbinit.c @@ -19,10 +19,10 @@ * @author Florian Dold * @author Marcello Stanisci */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #include "auditor-database/gc.h" #include "auditor-database/drop_tables.h" #include "auditor-database/create_tables.h" diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c @@ -22,15 +22,15 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <microhttpd.h> #include <pthread.h> #include <sys/resource.h> #include "taler/taler_mhd_lib.h" -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler-auditor-httpd_spa.h" #include "taler-auditor-httpd_put-deposit-confirmation.h" #include "taler-auditor-httpd_get-monitoring-deposit-confirmations.h" diff --git a/src/auditor/taler-auditor-httpd.h b/src/auditor/taler-auditor-httpd.h @@ -24,8 +24,8 @@ #define TALER_AUDITOR_HTTPD_H #include <microhttpd.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/auditor/taler-auditor-httpd_spa.c b/src/auditor/taler-auditor-httpd_spa.c @@ -18,7 +18,7 @@ * @brief logic to load single page app (/spa) * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" diff --git a/src/auditor/taler-auditor-sync.c b/src/auditor/taler-auditor-sync.c @@ -18,8 +18,8 @@ * @brief Tool used by the auditor to make a 'safe' copy of the exchanges' database. * @author Christian Grothoff */ -#include "taler/platform.h" -#include "taler/taler_exchangedb_lib.h" +#include "platform.h" +#include "exchangedb_lib.h" #include "exchange-database/preflight.h" #include "exchange-database/test_aml_officer.h" #include "exchange-database/abort_shard.h" diff --git a/src/auditor/taler-helper-auditor-aggregation.c b/src/auditor/taler-helper-auditor-aggregation.c @@ -18,10 +18,10 @@ * @brief audits an exchange's aggregations. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_bank_service.h" #include "taler/taler_signatures.h" #include "taler/taler_dbevents.h" diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c @@ -18,11 +18,11 @@ * @brief audits coins in an exchange database. * @author Christian Grothoff */ -#include "taler/platform.h" -#include "taler/taler_auditordb_lib.h" +#include "platform.h" +#include "auditordb_lib.h" #include "report-lib.h" #include "taler/taler_dbevents.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "auditor-database/del_denomination_balance.h" #include "auditor-database/event_listen.h" #include "auditor-database/get_auditor_progress.h" diff --git a/src/auditor/taler-helper-auditor-deposits.c b/src/auditor/taler-helper-auditor-deposits.c @@ -22,10 +22,10 @@ * We simply check that all of the deposit confirmations reported to us * by merchants were also reported to us by the exchange. */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_bank_service.h" #include "report-lib.h" #include "taler/taler_dbevents.h" diff --git a/src/auditor/taler-helper-auditor-purses.c b/src/auditor/taler-helper-auditor-purses.c @@ -18,10 +18,10 @@ * @brief audits the purses of an exchange database * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_bank_service.h" #include "taler/taler_signatures.h" #include "report-lib.h" diff --git a/src/auditor/taler-helper-auditor-reserves.c b/src/auditor/taler-helper-auditor-reserves.c @@ -18,11 +18,11 @@ * @brief audits the reserves of an exchange database * @author Christian Grothoff */ -#include "taler/platform.h" -#include "taler/taler_auditordb_lib.h" +#include "platform.h" +#include "auditordb_lib.h" #include "report-lib.h" #include "taler/taler_dbevents.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/select_reserve_close_request_info.h" #include "auditor-database/del_reserve_info.h" #include "auditor-database/event_listen.h" diff --git a/src/auditor/taler-helper-auditor-transfer.c b/src/auditor/taler-helper-auditor-transfer.c @@ -20,11 +20,11 @@ * database. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_curl_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "report-lib.h" #include "taler/taler_dbevents.h" diff --git a/src/auditor/taler-helper-auditor-wire-credit.c b/src/auditor/taler-helper-auditor-wire-credit.c @@ -21,11 +21,11 @@ * This auditor verifies that 'reserves_in' actually matches * the incoming wire transfers from the bank. */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_curl_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "taler/taler_signatures.h" diff --git a/src/auditor/taler-helper-auditor-wire-debit.c b/src/auditor/taler-helper-auditor-wire-debit.c @@ -30,11 +30,11 @@ * find that the wire transfers were made (wire transfers * could be delayed due to AML/KYC or core-banking issues). */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_curl_lib.h> -#include "taler/taler_auditordb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "auditordb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "taler/taler_signatures.h" diff --git a/src/auditordb/helper.c b/src/auditordb/helper.c @@ -19,7 +19,7 @@ * @author Christian Grothoff * @author Sree Harsha Totakura <sreeharsha@totakura.in> */ -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #include <ltdl.h> #include "pg_helper.h" diff --git a/src/auditordb/pg.c b/src/auditordb/pg.c @@ -22,7 +22,7 @@ #include "taler/taler_pq_lib.h" #include <pthread.h> #include <libpq-fe.h> -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #include "pg_helper.h" diff --git a/src/auditordb/pg_helper.h b/src/auditordb/pg_helper.h @@ -22,7 +22,7 @@ #define PG_HELPER_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** * Postgres database connection handle. diff --git a/src/auditordb/test_auditordb.c b/src/auditordb/test_auditordb.c @@ -20,7 +20,7 @@ * @author Christian Grothoff */ #include <gnunet/gnunet_db_lib.h> -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #include "auditor-database/create_tables.h" #include "auditor-database/del_reserve_info.h" #include "auditor-database/delete_auditor_closure_lag.h" diff --git a/src/auditordb/test_auditordb_checkpoints.c b/src/auditordb/test_auditordb_checkpoints.c @@ -20,7 +20,7 @@ */ #include <gnunet/gnunet_common.h> #include <gnunet/gnunet_db_lib.h> -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #include "auditor-database/create_tables.h" #include "auditor-database/drop_tables.h" #include "auditor-database/get_auditor_progress.h" diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c @@ -22,7 +22,7 @@ * @author Christian Grothoff <christian@grothoff.org> * @defgroup request Request handling routines */ -#include "taler/platform.h" +#include "platform.h" #include <pthread.h> #include <poll.h> #ifdef __linux__ diff --git a/src/bank-lib/fakebank_common_lp.c b/src/bank-lib/fakebank_common_lp.c @@ -21,7 +21,7 @@ * @brief long-polling support for fakebank * @author Christian Grothoff <christian@grothoff.org> */ -#include "taler/platform.h" +#include "platform.h" #include <pthread.h> #include <poll.h> #ifdef __linux__ diff --git a/src/bank-lib/taler-exchange-wire-gateway-client.c b/src/bank-lib/taler-exchange-wire-gateway-client.c @@ -18,7 +18,7 @@ * @brief Execute wire transfer. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> diff --git a/src/bank-lib/taler-fakebank-run.c b/src/bank-lib/taler-fakebank-run.c @@ -23,7 +23,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_fakebank_lib.h" #include "taler/taler_mhd_lib.h" diff --git a/src/benchmark/taler-aggregator-benchmark.c b/src/benchmark/taler-aggregator-benchmark.c @@ -21,13 +21,13 @@ * @brief Setup exchange database suitable for aggregator benchmarking * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <jansson.h> #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include "taler/taler_util.h" #include "taler/taler_signatures.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_error_codes.h" #include "exchange-database/rollback.h" diff --git a/src/benchmark/taler-bank-benchmark.c b/src/benchmark/taler-bank-benchmark.c @@ -24,14 +24,14 @@ */ // FIXME: support use of more than one 'client' bank account // FIXME: add taler-exchange-transfer to simulate outgoing payments -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> #include <sys/resource.h> #include "taler/taler_util.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_fakebank_lib.h" #include "taler/taler_testing_lib.h" #include "taler/taler_error_codes.h" diff --git a/src/benchmark/taler-exchange-benchmark.c b/src/benchmark/taler-exchange-benchmark.c @@ -23,7 +23,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> #include <sys/resource.h> diff --git a/src/exchange-tools/taler-auditor-offline.c b/src/exchange-tools/taler-auditor-offline.c @@ -18,7 +18,7 @@ * @brief Support for operations involving the auditor's (offline) key. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_json_lib.h> #include <microhttpd.h> #include "taler/taler_json_lib.h" diff --git a/src/exchange-tools/taler-exchange-dbinit.c b/src/exchange-tools/taler-exchange-dbinit.c @@ -19,9 +19,9 @@ * @author Florian Dold * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/gc.h" #include "exchange-database/preflight.h" diff --git a/src/exchange-tools/taler-exchange-kyc-trigger.c b/src/exchange-tools/taler-exchange-kyc-trigger.c @@ -18,7 +18,7 @@ * @brief Support for manually triggering KYC/AML processes for testing * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_json_lib.h> #include <gnunet/gnunet_util_lib.h> #include <microhttpd.h> diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c @@ -18,7 +18,7 @@ * @brief Support for operations involving the exchange's offline master key. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_json_lib.h> #include <gnunet/gnunet_util_lib.h> #include "taler/taler_json_lib.h" diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c @@ -19,11 +19,11 @@ * @brief Process that aggregates outgoing transactions and prepares their execution * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_kyclogic_lib.h" #include "taler/taler_bank_service.h" diff --git a/src/exchange/taler-exchange-closer.c b/src/exchange/taler-exchange-closer.c @@ -19,11 +19,11 @@ * @brief Process that closes expired reserves * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/start.h" diff --git a/src/exchange/taler-exchange-drain.c b/src/exchange/taler-exchange-drain.c @@ -19,11 +19,11 @@ * and puts them into some regular account of the exchange. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/start.h" diff --git a/src/exchange/taler-exchange-expire.c b/src/exchange/taler-exchange-expire.c @@ -19,11 +19,11 @@ * @brief Process that cleans up expired purses * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/start.h" diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c @@ -21,7 +21,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <microhttpd.h> diff --git a/src/exchange/taler-exchange-httpd.h b/src/exchange/taler-exchange-httpd.h @@ -29,7 +29,7 @@ #include "taler/taler_kyclogic_plugin.h" #include "taler/taler_extensions.h" #include <gnunet/gnunet_mhd_compat.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/exchange/taler-exchange-httpd_common_kyc.c b/src/exchange/taler-exchange-httpd_common_kyc.c @@ -24,7 +24,7 @@ #include "taler/taler_attributes.h" #include "taler/taler_error_codes.h" #include "taler/taler_kyclogic_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include <gnunet/gnunet_common.h> #include "exchange-database/commit.h" #include "exchange-database/get_kyc_rules.h" diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c @@ -25,7 +25,7 @@ #include "taler/taler_error_codes.h" #include "taler/taler_json_lib.h" #include "taler/taler_mhd_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_db.h" #include "taler-exchange-httpd_responses.h" #include "exchange-database/start.h" diff --git a/src/exchange/taler-exchange-httpd_db.h b/src/exchange/taler-exchange-httpd_db.h @@ -22,7 +22,7 @@ #define TALER_EXCHANGE_HTTPD_DB_H #include <microhttpd.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-metrics.h" #include <gnunet/gnunet_mhd_compat.h> diff --git a/src/exchange/taler-exchange-httpd_delete-purses-PURSE_PUB.c b/src/exchange/taler-exchange-httpd_delete-purses-PURSE_PUB.c @@ -29,7 +29,7 @@ #include "taler-exchange-httpd_common_deposit.h" #include "taler-exchange-httpd_delete-purses-PURSE_PUB.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/preflight.h" #include "exchange-database/do_purse_delete.h" diff --git a/src/exchange/taler-exchange-httpd_get-SPA.c b/src/exchange/taler-exchange-httpd_get-SPA.c @@ -18,7 +18,7 @@ * @brief logic to load single page apps (/) * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" diff --git a/src/exchange/taler-exchange-httpd_get-coins-COIN_PUB-history.c b/src/exchange/taler-exchange-httpd_get-coins-COIN_PUB-history.c @@ -18,7 +18,7 @@ * @brief Handle GET /coins/$COIN_PUB/history requests * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include "taler/taler_mhd_lib.h" diff --git a/src/exchange/taler-exchange-httpd_get-deposits.c b/src/exchange/taler-exchange-httpd_get-deposits.c @@ -18,7 +18,7 @@ * @brief Handle wire deposit tracking-related requests * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <microhttpd.h> diff --git a/src/exchange/taler-exchange-httpd_get-kyc-check-H_NORMALIZED_PAYTO.c b/src/exchange/taler-exchange-httpd_get-kyc-check-H_NORMALIZED_PAYTO.c @@ -18,7 +18,7 @@ * @brief Handle request for generic KYC check. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> diff --git a/src/exchange/taler-exchange-httpd_get-kyc-info-ACCESS_TOKEN.c b/src/exchange/taler-exchange-httpd_get-kyc-info-ACCESS_TOKEN.c @@ -18,14 +18,14 @@ * @brief Handle request for generic KYC info. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> #include <microhttpd.h> #include <pthread.h> #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_kyclogic_lib.h" #include "taler/taler_mhd_lib.h" #include "taler/taler_signatures.h" diff --git a/src/exchange/taler-exchange-httpd_get-reserves-RESERVE_PUB.c b/src/exchange/taler-exchange-httpd_get-reserves-RESERVE_PUB.c @@ -20,7 +20,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include "taler/taler_mhd_lib.h" diff --git a/src/exchange/taler-exchange-httpd_post-batch-deposit.c b/src/exchange/taler-exchange-httpd_post-batch-deposit.c @@ -33,7 +33,7 @@ #include "taler-exchange-httpd_common_kyc.h" #include "taler-exchange-httpd_post-batch-deposit.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/select_deposit_amounts_for_kyc_check.h" #include "exchange-database/do_check_deposit_idempotent.h" diff --git a/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-create.c b/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-create.c @@ -29,7 +29,7 @@ #include "taler-exchange-httpd_common_deposit.h" #include "taler-exchange-httpd_post-purses-PURSE_PUB-create.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/select_contract_by_purse.h" #include "exchange-database/do_purse_deposit.h" diff --git a/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-deposit.c b/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-deposit.c @@ -20,7 +20,7 @@ * to the database. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> @@ -31,7 +31,7 @@ #include "taler-exchange-httpd_common_deposit.h" #include "taler-exchange-httpd_post-purses-PURSE_PUB-deposit.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/select_purse.h" #include "exchange-database/do_purse_deposit.h" diff --git a/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-merge.c b/src/exchange/taler-exchange-httpd_post-purses-PURSE_PUB-merge.c @@ -20,7 +20,7 @@ * to the database. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> @@ -33,7 +33,7 @@ #include "taler-exchange-httpd_common_kyc.h" #include "taler-exchange-httpd_post-purses-PURSE_PUB-merge.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/select_purse_merge.h" #include "exchange-database/do_purse_merge.h" diff --git a/src/exchange/taler-exchange-httpd_post-recoup-refresh.c b/src/exchange/taler-exchange-httpd_post-recoup-refresh.c @@ -31,7 +31,7 @@ #include "taler-exchange-httpd_post-recoup-refresh.h" #include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_get-keys.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/get_old_coin_by_h_blind.h" #include "exchange-database/do_recoup_refresh.h" diff --git a/src/exchange/taler-exchange-httpd_post-recoup-withdraw.c b/src/exchange/taler-exchange-httpd_post-recoup-withdraw.c @@ -31,7 +31,7 @@ #include "taler-exchange-httpd_post-recoup-withdraw.h" #include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_get-keys.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/get_reserve_by_h_planchets.h" #include "exchange-database/do_recoup.h" diff --git a/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-purse.c b/src/exchange/taler-exchange-httpd_post-reserves-RESERVE_PUB-purse.c @@ -31,7 +31,7 @@ #include "taler-exchange-httpd_common_kyc.h" #include "taler-exchange-httpd_post-reserves-RESERVE_PUB-purse.h" #include "taler-exchange-httpd_responses.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler-exchange-httpd_get-keys.h" #include "exchange-database/select_purse_merge.h" #include "exchange-database/do_reserve_purse.h" diff --git a/src/exchange/taler-exchange-httpd_responses.h b/src/exchange/taler-exchange-httpd_responses.h @@ -31,7 +31,7 @@ #include "taler/taler_error_codes.h" #include "taler-exchange-httpd.h" #include "taler-exchange-httpd_db.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/ensure_coin_known.h" diff --git a/src/exchange/taler-exchange-router.c b/src/exchange/taler-exchange-router.c @@ -22,11 +22,11 @@ * and watching for incoming wad transfers is done by taler-exchange-wirewatch. * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/release_revolving_shard.h" diff --git a/src/exchange/taler-exchange-sanctionscheck.c b/src/exchange/taler-exchange-sanctionscheck.c @@ -18,13 +18,13 @@ * @brief Process that checks all existing customers against a sanctions list * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> #include <microhttpd.h> #include "taler/taler_dbevents.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_kyclogic_lib.h" #include <math.h> diff --git a/src/exchange/taler-exchange-transfer.c b/src/exchange/taler-exchange-transfer.c @@ -18,11 +18,11 @@ * @brief Process that actually finalizes outgoing transfers with the wire gateway / bank * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/begin_shard.h" diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c @@ -18,12 +18,12 @@ * @brief Process that watches for wire transfers to the exchange's bank account * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <pthread.h> #include <microhttpd.h> -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_bank_service.h" #include "exchange-database/begin_shard.h" diff --git a/src/exchangedb/account_history.c b/src/exchangedb/account_history.c @@ -18,8 +18,8 @@ * @brief helper function to build AML inputs from account histories * @author Christian Grothoff */ -#include "taler/taler_exchangedb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_kyclogic_lib.h" #include "taler/taler_json_lib.h" #include "exchange-database/lookup_aml_history.h" diff --git a/src/exchangedb/add_policy_fulfillment_proof.c b/src/exchangedb/add_policy_fulfillment_proof.c @@ -18,7 +18,7 @@ * @brief Implementation of the add_policy_fulfillment_proof function for Postgres * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_error_codes.h" /* UNNECESSARY? */ #include "taler/taler_dbevents.h" /* UNNECESSARY? */ #include "taler/taler_pq_lib.h" diff --git a/src/exchangedb/batch_ensure_coin_known.c b/src/exchangedb/batch_ensure_coin_known.c @@ -21,7 +21,7 @@ * FIXME-#9373: use the array support for postgres to simplify this code! * */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/batch_ensure_coin_known.h" #include "helper.h" diff --git a/src/exchangedb/bench_db.c b/src/exchangedb/bench_db.c @@ -20,7 +20,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_pq_lib.h> #include "taler/taler_util.h" diff --git a/src/exchangedb/do_refresh.c b/src/exchangedb/do_refresh.c @@ -18,7 +18,7 @@ * @brief Implementation of the do_refresh function for Postgres * @author Özgür Kesim */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/do_refresh.h" #include "helper.h" diff --git a/src/exchangedb/do_withdraw.c b/src/exchangedb/do_withdraw.c @@ -18,7 +18,7 @@ * @brief Implementation of the do_withdraw function for Postgres * @author Özgür Kesim */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/do_withdraw.h" #include "helper.h" diff --git a/src/exchangedb/ensure_coin_known.c b/src/exchangedb/ensure_coin_known.c @@ -18,7 +18,7 @@ * @brief Implementation of the ensure_coin_known function for Postgres * @author Christian Grothoff */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/ensure_coin_known.h" #include "helper.h" diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c @@ -18,7 +18,7 @@ * @brief Logic to parse account information from the configuration * @author Christian Grothoff */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/exchangedb/free_coin_transaction_list.c b/src/exchangedb/free_coin_transaction_list.c @@ -18,7 +18,7 @@ * @brief Implementation to free the coin transaction list * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "exchange-database/free_coin_transaction_list.h" diff --git a/src/exchangedb/free_reserve_history.c b/src/exchangedb/free_reserve_history.c @@ -18,7 +18,7 @@ * @brief Function to free a reserve history * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "exchange-database/free_reserve_history.h" diff --git a/src/exchangedb/get_coin_transactions.c b/src/exchangedb/get_coin_transactions.c @@ -19,7 +19,7 @@ * @author Christian Grothoff */ #include "taler/taler_error_codes.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/get_coin_transactions.h" #include "helper.h" diff --git a/src/exchangedb/get_wire_hash_for_contract.c b/src/exchangedb/get_wire_hash_for_contract.c @@ -18,7 +18,7 @@ * @brief Implementation of the get_wire_hash_for_contract function for Postgres * @author Özgür Kesim */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_pq_lib.h" #include "exchange-database/get_wire_hash_for_contract.h" #include "helper.h" diff --git a/src/exchangedb/helper.h b/src/exchangedb/helper.h @@ -23,7 +23,7 @@ #include "taler/taler_dbevents.h" /* UNNECESSARY? */ #include "taler/taler_error_codes.h" /* UNNECESSARY? */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" #include "taler/taler_pq_lib.h" #include "taler/taler_util.h" diff --git a/src/exchangedb/insert_kyc_failure.c b/src/exchangedb/insert_kyc_failure.c @@ -18,7 +18,7 @@ * @brief Implementation of the insert_kyc_failure function for Postgres * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_error_codes.h" #include "taler/taler_dbevents.h" /* UNNECESSARY? */ #include "taler/taler_pq_lib.h" diff --git a/src/exchangedb/persist_aml_program_result.c b/src/exchangedb/persist_aml_program_result.c @@ -18,7 +18,7 @@ * @brief helper function store results of AML programs * @author Christian Grothoff */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_kyclogic_lib.h" #include "exchange-database/insert_aml_decision.h" #include "exchange-database/insert_aml_program_failure.h" diff --git a/src/exchangedb/pg.c b/src/exchangedb/pg.c @@ -27,7 +27,7 @@ #include <pthread.h> #include <libpq-fe.h> #include "helper.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/preflight.h" /** diff --git a/src/exchangedb/spi/Makefile b/src/exchangedb/spi/Makefile @@ -1,9 +0,0 @@ -EXTENSION = own_test -MODULES = own_test -DATA = own_test.sql -PG_CPPFLAGS = -I /usr/include/postgresql - -# postgresql build stuff -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c @@ -21,9 +21,9 @@ * @author Marcello Stanisci * @author Özgür Kesim */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/exchangedb/test_exchangedb_by_j.c b/src/exchangedb/test_exchangedb_by_j.c @@ -18,9 +18,9 @@ * @brief test cases for DB interaction functions * @author Joseph Xu */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "math.h" #define ROUNDS 10 diff --git a/src/exchangedb/update_rules.c b/src/exchangedb/update_rules.c @@ -18,7 +18,7 @@ * @brief helper function to handle AML programs * @author Christian Grothoff */ -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_kyclogic_lib.h" #include "taler/taler_dbevents.h" #include "exchange-database/start.h" diff --git a/src/extensions/extensions.c b/src/extensions/extensions.c @@ -18,7 +18,7 @@ * @brief Utility functions for extensions * @author Özgür Kesim */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_extensions_policy.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" diff --git a/src/include/auditor-database/create_tables.h b/src/include/auditor-database/create_tables.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/del_denomination_balance.h b/src/include/auditor-database/del_denomination_balance.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_DEL_DENOMINATION_BALANCE_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/del_reserve_info.h b/src/include/auditor-database/del_reserve_info.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_DEL_RESERVE_INFO_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_auditor_closure_lag.h b/src/include/auditor-database/delete_auditor_closure_lag.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_early_aggregation.h b/src/include/auditor-database/delete_early_aggregation.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_DELETE_EARLY_AGGREGATION_H #define AUDITOR_DATABASE_DELETE_EARLY_AGGREGATION_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_generic.h b/src/include/auditor-database/delete_generic.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_DELETE_GENERIC_H #define AUDITOR_DATABASE_DELETE_GENERIC_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_pending_deposit.h b/src/include/auditor-database/delete_pending_deposit.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_DELETE_PENDING_DEPOSIT_H #define AUDITOR_DATABASE_DELETE_PENDING_DEPOSIT_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_purse_info.h b/src/include/auditor-database/delete_purse_info.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_DELETE_PURSE_INFO_H #define AUDITOR_DATABASE_DELETE_PURSE_INFO_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_reserve_in_inconsistency.h b/src/include/auditor-database/delete_reserve_in_inconsistency.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_DELETE_RESERVE_IN_INCONSISTENCY_H #define AUDITOR_DATABASE_DELETE_RESERVE_IN_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/delete_wire_out_inconsistency_if_matching.h b/src/include/auditor-database/delete_wire_out_inconsistency_if_matching.h @@ -16,7 +16,7 @@ #ifndef AUDITOR_DATABASE_DELETE_WIRE_OUT_INCONSISTENCY_IF_MATCHING_H #define AUDITOR_DATABASE_DELETE_WIRE_OUT_INCONSISTENCY_IF_MATCHING_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/drop_tables.h b/src/include/auditor-database/drop_tables.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/event_listen.h b/src/include/auditor-database/event_listen.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_EVENT_LISTEN_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** * Register callback to be invoked on events of type @a es. diff --git a/src/include/auditor-database/event_notify.h b/src/include/auditor-database/event_notify.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_EVENT_NOTIFY_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/gc.h b/src/include/auditor-database/gc.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_amount_arithmetic_inconsistency.h b/src/include/auditor-database/get_amount_arithmetic_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_AMOUNT_ARITHMETIC_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_auditor_closure_lags.h b/src/include/auditor-database/get_auditor_closure_lags.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_auditor_progress.h b/src/include/auditor-database/get_auditor_progress.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_GET_AUDITOR_PROGRESS_H #define AUDITOR_DATABASE_GET_AUDITOR_PROGRESS_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_bad_sig_losses.h b/src/include/auditor-database/get_bad_sig_losses.h @@ -18,7 +18,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_balance.h b/src/include/auditor-database/get_balance.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_balances.h b/src/include/auditor-database/get_balances.h @@ -18,7 +18,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_coin_inconsistency.h b/src/include/auditor-database/get_coin_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_COIN_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_denomination_balance.h b/src/include/auditor-database/get_denomination_balance.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_GET_DENOMINATION_BALANCE_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_denomination_key_validity_withdraw_inconsistency.h b/src/include/auditor-database/get_denomination_key_validity_withdraw_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_denomination_pending.h b/src/include/auditor-database/get_denomination_pending.h @@ -18,7 +18,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_denominations_without_sigs.h b/src/include/auditor-database/get_denominations_without_sigs.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_deposit_confirmations.h b/src/include/auditor-database/get_deposit_confirmations.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_emergency.h b/src/include/auditor-database/get_emergency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_EMERGENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_emergency_by_count.h b/src/include/auditor-database/get_emergency_by_count.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_EMERGENCY_BY_COUNT_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_exchange_signkeys.h b/src/include/auditor-database/get_exchange_signkeys.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" struct TALER_AUDITORDB_ExchangeSignkeys diff --git a/src/include/auditor-database/get_fee_time_inconsistency.h b/src/include/auditor-database/get_fee_time_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_FEE_TIME_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_misattribution_in_inconsistency.h b/src/include/auditor-database/get_misattribution_in_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_progress_points.h b/src/include/auditor-database/get_progress_points.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_purse_info.h b/src/include/auditor-database/get_purse_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_purse_not_closed_inconsistencies.h b/src/include/auditor-database/get_purse_not_closed_inconsistencies.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_PURSE_NOT_CLOSED_INCONSISTENCIES_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_purses.h b/src/include/auditor-database/get_purses.h @@ -18,7 +18,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" struct TALER_AUDITORDB_Purses diff --git a/src/include/auditor-database/get_reserve_balance_insufficient_inconsistency.h b/src/include/auditor-database/get_reserve_balance_insufficient_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_reserve_balance_summary_wrong_inconsistency.h b/src/include/auditor-database/get_reserve_balance_summary_wrong_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_reserve_in_inconsistency.h b/src/include/auditor-database/get_reserve_in_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_reserve_info.h b/src/include/auditor-database/get_reserve_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_reserve_not_closed_inconsistency.h b/src/include/auditor-database/get_reserve_not_closed_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_reserves.h b/src/include/auditor-database/get_reserves.h @@ -18,7 +18,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" struct TALER_AUDITORDB_Reserves diff --git a/src/include/auditor-database/get_row_inconsistency.h b/src/include/auditor-database/get_row_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_GET_ROW_INCONSISTENCY_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_row_minor_inconsistencies.h b/src/include/auditor-database/get_row_minor_inconsistencies.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_wire_fee_summary.h b/src/include/auditor-database/get_wire_fee_summary.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/get_wire_format_inconsistency.h b/src/include/auditor-database/get_wire_format_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/get_wire_out_inconsistency.h b/src/include/auditor-database/get_wire_out_inconsistency.h @@ -20,7 +20,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" typedef enum GNUNET_GenericReturnValue diff --git a/src/include/auditor-database/insert_amount_arithmetic_inconsistency.h b/src/include/auditor-database/insert_amount_arithmetic_inconsistency.h @@ -17,7 +17,7 @@ #define AUDITOR_DATABASE_INSERT_AMOUNT_ARITHMETIC_INCONSISTENCY_H // #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_auditor_closure_lags.h b/src/include/auditor-database/insert_auditor_closure_lags.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_AUDITOR_CLOSURE_LAGS_H #define AUDITOR_DATABASE_INSERT_AUDITOR_CLOSURE_LAGS_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_auditor_progress.h b/src/include/auditor-database/insert_auditor_progress.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_INSERT_AUDITOR_PROGRESS_H #define AUDITOR_DATABASE_INSERT_AUDITOR_PROGRESS_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_bad_sig_losses.h b/src/include/auditor-database/insert_bad_sig_losses.h @@ -16,7 +16,7 @@ #ifndef AUDITOR_DATABASE_INSERT_BAD_SIG_LOSSES_H #define AUDITOR_DATABASE_INSERT_BAD_SIG_LOSSES_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_balance.h b/src/include/auditor-database/insert_balance.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** * Insert information about a balance tracked by the auditor. There must not be an diff --git a/src/include/auditor-database/insert_coin_inconsistency.h b/src/include/auditor-database/insert_coin_inconsistency.h @@ -18,7 +18,7 @@ #define AUDITOR_DATABASE_INSERT_COIN_INCONSISTENCY_H // #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_denomination_balance.h b/src/include/auditor-database/insert_denomination_balance.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_INSERT_DENOMINATION_BALANCE_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_denomination_key_validity_withdraw_inconsistency.h b/src/include/auditor-database/insert_denomination_key_validity_withdraw_inconsistency.h @@ -19,7 +19,7 @@ #define \ AUDITOR_DATABASE_INSERT_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_denomination_pending.h b/src/include/auditor-database/insert_denomination_pending.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_DENOMINATION_PENDING_H #define AUDITOR_DATABASE_INSERT_DENOMINATION_PENDING_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_denominations_without_sigs.h b/src/include/auditor-database/insert_denominations_without_sigs.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_DENOMINATIONS_WITHOUT_SIGS_H #define AUDITOR_DATABASE_INSERT_DENOMINATIONS_WITHOUT_SIGS_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_deposit_confirmation.h b/src/include/auditor-database/insert_deposit_confirmation.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_INSERT_DEPOSIT_CONFIRMATION_H #define AUDITOR_DATABASE_INSERT_DEPOSIT_CONFIRMATION_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_early_aggregation.h b/src/include/auditor-database/insert_early_aggregation.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_emergency.h b/src/include/auditor-database/insert_emergency.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_EMERGENCY_H #define AUDITOR_DATABASE_INSERT_EMERGENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_emergency_by_count.h b/src/include/auditor-database/insert_emergency_by_count.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_EMERGENCY_BY_COUNT_H #define AUDITOR_DATABASE_INSERT_EMERGENCY_BY_COUNT_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_exchange_signkey.h b/src/include/auditor-database/insert_exchange_signkey.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_INSERT_EXCHANGE_SIGNKEY_H #define AUDITOR_DATABASE_INSERT_EXCHANGE_SIGNKEY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_fee_time_inconsistency.h b/src/include/auditor-database/insert_fee_time_inconsistency.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_FEE_TIME_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_FEE_TIME_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_historic_denom_revenue.h b/src/include/auditor-database/insert_historic_denom_revenue.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_historic_reserve_revenue.h b/src/include/auditor-database/insert_historic_reserve_revenue.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_misattribution_in_inconsistency.h b/src/include/auditor-database/insert_misattribution_in_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_MISATTRIBUTION_IN_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_MISATTRIBUTION_IN_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_pending_deposit.h b/src/include/auditor-database/insert_pending_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_purse_info.h b/src/include/auditor-database/insert_purse_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_purse_not_closed_inconsistencies.h b/src/include/auditor-database/insert_purse_not_closed_inconsistencies.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_PURSE_NOT_CLOSED_INCONSISTENCIES_H #define AUDITOR_DATABASE_INSERT_PURSE_NOT_CLOSED_INCONSISTENCIES_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_reserve_balance_insufficient_inconsistency.h b/src/include/auditor-database/insert_reserve_balance_insufficient_inconsistency.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_reserve_balance_summary_wrong_inconsistency.h b/src/include/auditor-database/insert_reserve_balance_summary_wrong_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_reserve_in_inconsistency.h b/src/include/auditor-database/insert_reserve_in_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_RESERVE_IN_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_RESERVE_IN_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_reserve_info.h b/src/include/auditor-database/insert_reserve_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_reserve_not_closed_inconsistency.h b/src/include/auditor-database/insert_reserve_not_closed_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_RESERVE_NOT_CLOSED_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_RESERVE_NOT_CLOSED_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_row_inconsistency.h b/src/include/auditor-database/insert_row_inconsistency.h @@ -17,7 +17,7 @@ #ifndef AUDITOR_DATABASE_INSERT_ROW_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_ROW_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_row_minor_inconsistencies.h b/src/include/auditor-database/insert_row_minor_inconsistencies.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_ROW_MINOR_INCONSISTENCIES_H #define AUDITOR_DATABASE_INSERT_ROW_MINOR_INCONSISTENCIES_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_wire_format_inconsistency.h b/src/include/auditor-database/insert_wire_format_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_WIRE_FORMAT_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_WIRE_FORMAT_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/insert_wire_out_inconsistency.h b/src/include/auditor-database/insert_wire_out_inconsistency.h @@ -18,7 +18,7 @@ #ifndef AUDITOR_DATABASE_INSERT_WIRE_OUT_INCONSISTENCY_H #define AUDITOR_DATABASE_INSERT_WIRE_OUT_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/lookup_reserve_in_inconsistency.h b/src/include/auditor-database/lookup_reserve_in_inconsistency.h @@ -16,7 +16,7 @@ #ifndef AUDITOR_DATABASE_LOOKUP_RESERVE_IN_INCONSISTENCY_H #define AUDITOR_DATABASE_LOOKUP_RESERVE_IN_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/preflight.h b/src/include/auditor-database/preflight.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_early_aggregations.h b/src/include/auditor-database/select_early_aggregations.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_historic_denom_revenue.h b/src/include/auditor-database/select_historic_denom_revenue.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_historic_reserve_revenue.h b/src/include/auditor-database/select_historic_reserve_revenue.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_pending_deposits.h b/src/include/auditor-database/select_pending_deposits.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_purse_expired.h b/src/include/auditor-database/select_purse_expired.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/select_reserve_in_inconsistency.h b/src/include/auditor-database/select_reserve_in_inconsistency.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_SELECT_RESERVE_IN_INCONSISTENCY_H #define AUDITOR_DATABASE_SELECT_RESERVE_IN_INCONSISTENCY_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/start.h b/src/include/auditor-database/start.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/template.h b/src/include/auditor-database/template.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_TEMPLATE_H #define AUDITOR_DATABASE_TEMPLATE_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" #endif diff --git a/src/include/auditor-database/update_auditor_progress.h b/src/include/auditor-database/update_auditor_progress.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_UPDATE_AUDITOR_PROGRESS_H #define AUDITOR_DATABASE_UPDATE_AUDITOR_PROGRESS_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_balance.h b/src/include/auditor-database/update_balance.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_denomination_balance.h b/src/include/auditor-database/update_denomination_balance.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_UPDATE_DENOMINATION_BALANCE_H #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_generic_suppressed.h b/src/include/auditor-database/update_generic_suppressed.h @@ -21,7 +21,7 @@ #ifndef AUDITOR_DATABASE_UPDATE_GENERIC_SUPPRESSED_H #define AUDITOR_DATABASE_UPDATE_GENERIC_SUPPRESSED_H -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_purse_info.h b/src/include/auditor-database/update_purse_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_reserve_info.h b/src/include/auditor-database/update_reserve_info.h @@ -22,7 +22,7 @@ #define AUDITOR_DATABASE_UPDATE_RESERVE_INFO_H #include "taler/taler_util.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditor-database/update_wire_fee_summary.h b/src/include/auditor-database/update_wire_fee_summary.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_auditordb_lib.h" +#include "auditordb_lib.h" /** diff --git a/src/include/auditordb_lib.h b/src/include/auditordb_lib.h @@ -0,0 +1,628 @@ +/* + This file is part of TALER + Copyright (C) 2016 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +*/ +/** + * @file include/auditordb_lib.h + * @brief high-level interface for the auditor's database + * @author Florian Dold + * @author Benedikt Mueller + * @author Christian Grothoff + */ +#ifndef TALER_AUDITORDB_LIB_H +#define TALER_AUDITORDB_LIB_H + +#include <jansson.h> +#include <gnunet/gnunet_util_lib.h> +#include <gnunet/gnunet_db_lib.h> +#include <taler/taler_util.h> +#include <auditordb_lib.h> + +/** + * Connection to the postgres database of the auditor. + */ +struct TALER_AUDITORDB_PostgresContext; + + +/** + * Information about a deposit confirmation we received from + * a merchant. + */ +struct TALER_AUDITORDB_DepositConfirmation +{ + + /** + * Hash over the contract for which this deposit is made. + */ + struct TALER_PrivateContractHashP h_contract_terms; + + /** + * Hash over the policy extension for the deposit. + */ + struct TALER_ExtensionPolicyHashP h_policy; + + /** + * Hash over the wiring information of the merchant. + */ + struct TALER_MerchantWireHashP h_wire; + + /** + * Time when this deposit confirmation was generated by the exchange. + */ + struct GNUNET_TIME_Timestamp exchange_timestamp; + + /** + * How much time does the @e merchant have to issue a refund + * request? Zero if refunds are not allowed. After this time, the + * coin cannot be refunded. Note that the wire transfer will not be + * performed by the exchange until the refund deadline. This value + * is taken from the original deposit request. + */ + struct GNUNET_TIME_Timestamp refund_deadline; + + /** + * How much time does the @e exchange have to wire the funds? + */ + struct GNUNET_TIME_Timestamp wire_deadline; + + /** + * Amount to be deposited, excluding fee. Calculated from the + * amount with fee and the fee from the deposit request. + */ + struct TALER_Amount total_without_fee; + + /** + * Array of the coin public keys involved in the + * batch deposit operation. + */ + const struct TALER_CoinSpendPublicKeyP *coin_pubs; + + /** + * Array of coin deposit signatures from the deposit operation. + */ + const struct TALER_CoinSpendSignatureP *coin_sigs; + + /** + * The Merchant's public key. Allows the merchant to later refund + * the transaction or to inquire about the wire transfer identifier. + */ + struct TALER_MerchantPublicKeyP merchant; + + /** + * Signature from the exchange of type + * #TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT. + */ + struct TALER_ExchangeSignatureP exchange_sig; + + /** + * Public signing key from the exchange matching @e exchange_sig. + */ + struct TALER_ExchangePublicKeyP exchange_pub; + + /** + * Exchange master signature over @e exchange_sig. + */ + struct TALER_MasterSignatureP master_sig; + + /** + * Row of this entry in the auditor database. + */ + uint64_t row_id; + + /** + * Length of the @e coin_pubs and @e coin_sigs arrays. + */ + unsigned int num_coins; + + bool suppressed; + +}; + + +/** + * Information about a row inconsistency + */ +struct TALER_AUDITORDB_Generic_Update +{ + uint64_t row_id; + bool suppressed; + bool ancient; +}; + + +/** + * Information about a coin inconsistency + */ +struct TALER_AUDITORDB_CoinInconsistency +{ + uint64_t row_id; + char *operation; + struct TALER_Amount exchange_amount; + struct TALER_Amount auditor_amount; + struct GNUNET_CRYPTO_EddsaPublicKey coin_pub; + bool profitable; +}; + +/** + * Information about a row inconsistency + */ +struct TALER_AUDITORDB_RowInconsistency +{ + uint64_t row_id; + char *row_table; + char *diagnostic; + bool suppressed; +}; + +/** + * Information about a bad sig loss + */ +struct TALER_AUDITORDB_BadSigLosses +{ + uint64_t row_id; + uint64_t problem_row_id; + char *operation; + struct TALER_Amount loss; + struct GNUNET_CRYPTO_EddsaPublicKey operation_specific_pub; + bool suppressed; +}; + +/** + * Information about a closure lags + */ +struct TALER_AUDITORDB_ClosureLags +{ + uint64_t row_id; + uint64_t problem_row_id; + struct TALER_Amount amount; + struct GNUNET_TIME_Absolute deadline; + struct TALER_WireTransferIdentifierRawP wtid; + struct TALER_FullPayto account; + bool suppressed; +}; + +/** + * Information about a emergency + */ +struct TALER_AUDITORDB_Emergency +{ + uint64_t row_id; + struct TALER_DenominationHashP denompub_h; + struct TALER_Amount denom_risk; + struct TALER_Amount denom_loss; + struct GNUNET_TIME_Absolute deposit_start; + struct GNUNET_TIME_Absolute deposit_end; + struct TALER_Amount value; + bool suppressed; +}; + +/** + * Information about an emergency by count + */ +struct TALER_AUDITORDB_EmergenciesByCount +{ + uint64_t row_id; + struct TALER_DenominationHashP denompub_h; + uint64_t num_issued; + uint64_t num_known; + struct TALER_Amount risk; + struct GNUNET_TIME_Absolute start; + struct GNUNET_TIME_Absolute deposit_end; + struct TALER_Amount value; + bool suppressed; +}; + +/** + * Information about a fee time inconsistency + */ +struct TALER_AUDITORDB_FeeTimeInconsistency +{ + uint64_t row_id; + uint64_t problem_row_id; + char *type; + struct GNUNET_TIME_Absolute time; + char *diagnostic; +}; + +/** + * Information about a denom key validity withdraw inconsistency + */ +struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency +{ + uint64_t row_id; + uint64_t problem_row_id; + struct GNUNET_TIME_Absolute execution_date; + struct TALER_ReservePublicKeyP reserve_pub; + struct TALER_DenominationHashP denompub_h; + bool suppressed; +}; + +/** + * Information about a purse not closed inconsistencies + */ +struct TALER_AUDITORDB_PurseNotClosedInconsistencies +{ + uint64_t row_id; + struct GNUNET_CRYPTO_EddsaPublicKey purse_pub; + struct TALER_Amount amount; + struct GNUNET_TIME_Absolute expiration_date; + bool suppressed; +}; + +/** + * Information about a reserve balance insufficient inconsistency + */ +struct TALER_AUDITORDB_ReserveBalanceInsufficientInconsistency +{ + uint64_t row_id; + struct GNUNET_CRYPTO_EddsaPublicKey reserve_pub; + bool inconsistency_gain; + struct TALER_Amount inconsistency_amount; + bool suppressed; +}; + +/** + * Information about a reserve in inconsistency + */ +struct TALER_AUDITORDB_ReserveInInconsistency +{ + uint64_t serial_id; + uint64_t bank_row_id; + struct TALER_Amount amount_exchange_expected; + struct TALER_Amount amount_wired; + struct TALER_ReservePublicKeyP reserve_pub; + struct GNUNET_TIME_Absolute timestamp; + struct TALER_FullPayto account; + char *diagnostic; + bool suppressed; + +}; + +/** + * Balance values for a reserve (or all reserves). + */ +struct TALER_AUDITORDB_ReserveFeeBalance +{ + /** + * Remaining funds. + */ + struct TALER_Amount reserve_balance; + + /** + * Losses from operations that should not have + * happened (e.g. negative balance). + */ + struct TALER_Amount reserve_loss; + + /** + * Fees charged for withdraw. + */ + struct TALER_Amount withdraw_fee_balance; + + /** + * Fees charged for closing. + */ + struct TALER_Amount close_fee_balance; + + /** + * Fees charged for purse creation. + */ + struct TALER_Amount purse_fee_balance; + + /** + * Opening fees charged. + */ + struct TALER_Amount open_fee_balance; + + /** + * History fees charged. + */ + struct TALER_Amount history_fee_balance; +}; + + +/** + * Balance data for denominations in circulation. + */ +struct TALER_AUDITORDB_DenominationCirculationData +{ + /** + * Amount of outstanding coins in circulation. + */ + struct TALER_Amount denom_balance; + + /** + * Amount lost due coins illicitly accepted (effectively, a + * negative @a denom_balance). + */ + struct TALER_Amount denom_loss; + + /** + * Total amount that could still be theoretically lost in the future due to + * recoup operations. (Total put into circulation minus @e recoup_loss). + */ + struct TALER_Amount denom_risk; + + /** + * Amount lost due to recoups. + */ + struct TALER_Amount recoup_loss; + + /** + * Number of coins of this denomination that the exchange signed into + * existence. + */ + uint64_t num_issued; +}; + +struct TALER_AUDITORDB_DenominationsWithoutSigs +{ + uint64_t row_id; + struct TALER_DenominationHashP denompub_h; + struct TALER_Amount value; + struct GNUNET_TIME_Absolute start_time; + struct GNUNET_TIME_Absolute end_time; + bool suppressed; +}; + +struct TALER_AUDITORDB_MisattributionInInconsistency +{ + uint64_t row_id; + struct TALER_Amount amount; + uint64_t bank_row; + struct TALER_ReservePublicKeyP reserve_pub; + bool suppressed; + +}; + +struct TALER_AUDITORDB_DenominationPending +{ + uint64_t row_id; + struct TALER_DenominationHashP denom_pub_hash; + struct TALER_Amount denom_balance; + struct TALER_Amount denom_loss; + uint64_t num_issued; + struct TALER_Amount denom_risk; + struct TALER_Amount recoup_loss; + bool suppressed; + +}; + +struct TALER_AUDITORDB_HistoricReserveSummary +{ + uint64_t row_id; + struct GNUNET_TIME_Absolute start_date; + struct GNUNET_TIME_Absolute end_date; + struct TALER_Amount reserve_profits; + bool suppressed; + +}; + +struct TALER_AUDITORDB_WireFormatInconsistency +{ + uint64_t row_id; + struct TALER_Amount amount; + uint64_t wire_offset; + char *diagnostic; + bool suppressed; + +}; + +struct TALER_AUDITORDB_WireOutInconsistency +{ + uint64_t row_id; + struct TALER_FullPayto destination_account; + char *diagnostic; + uint64_t wire_out_row_id; + struct TALER_Amount expected; + struct TALER_Amount claimed; + bool suppressed; + +}; + +struct TALER_AUDITORDB_RowMinorInconsistencies +{ + uint64_t row_id; + char *row_table; + uint64_t problem_row; + char *diagnostic; + bool suppressed; +}; + + +struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency +{ + uint64_t row_id; + struct TALER_ReservePublicKeyP reserve_pub; + struct TALER_Amount exchange_amount; + struct TALER_Amount auditor_amount; + bool suppressed; + +}; + +struct TALER_AUDITORDB_ReserveNotClosedInconsistency +{ + uint64_t row_id; + struct TALER_ReservePublicKeyP reserve_pub; + struct TALER_Amount balance; + struct GNUNET_TIME_Absolute expiration_time; + char *diagnostic; + bool suppressed; + +}; + + +enum TALER_AUDITORDB_DeletableSuppressableTables +{ + /** + * For auditor_amount_arithmetic_inconsistency table. + */ + TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY, + + /** + * For auditor_closure_lags table. + */ + TALER_AUDITORDB_CLOSURE_LAGS, + + /** + * For auditor_progress table. + */ + TALER_AUDITORDB_PROGRESS, + + /** + * For auditor_bad_sig_losses table. + */ + TALER_AUDITORDB_BAD_SIG_LOSSES, + + /** + * For auditor_coin_inconsistency table. + */ + TALER_AUDITORDB_COIN_INCONSISTENCY, + + /** + * For auditor_denomination_key_validity_withdraw_inconsistency table. + */ + TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY, + + /** + * For auditor_denomination_pending table. + */ + TALER_AUDITORDB_DENOMINATION_PENDING, + + /** + * For auditor_denominations_without_sig table. + */ + TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG, + + /** + * For auditor_deposit_confirmation table. + */ + TALER_AUDITORDB_DEPOSIT_CONFIRMATION, + + /** + * For auditor_emergency table. + */ + TALER_AUDITORDB_EMERGENCY, + + /** + * For auditor_emergency_by_count table. + */ + TALER_AUDITORDB_EMERGENCY_BY_COUNT, + + /** + * For auditor_fee_time_inconsistency table. + */ + TALER_AUDITORDB_FEE_TIME_INCONSISTENCY, + + /** + * For auditor_misattribution_in_inconsistency table. + */ + TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY, + + /** + * For auditor_purse_not_closed_inconsistency table. + */ + TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY, + + /** + * For auditor_refreshes_hanging table. + */ + TALER_AUDITORDB_REFRESHES_HANGING, + + /** + * For auditor_reserve_balance_insufficient_inconsistency table. + */ + TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY, + + /** + * For auditor_reserve_balance_summary_wrong_inconsistency table. + */ + TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY, + + /** + * For auditor_reserve_in_inconsistency table. + */ + TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY, + + /** + * For auditor_reserve_not_closed_inconsistency table. + */ + TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY, + + /** + * For auditor_row_inconsistency table. + */ + TALER_AUDITORDB_ROW_INCONSISTENCY, + + /** + * For auditor_row_minor_inconsistency table. + */ + TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY, + + /** + * For auditor_wire_format_inconsistency table. + */ + TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY, + + /** + * For auditor_wire_out_inconsistency table. + */ + TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY, + + /** + * Terminal. + */ + TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX +}; + + +/** + * Information about an arithmetic inconsistency + */ +struct TALER_AUDITORDB_AmountArithmeticInconsistency +{ + uint64_t row_id; + uint64_t problem_row_id; + char *operation; + struct TALER_Amount exchange_amount; + struct TALER_Amount auditor_amount; + bool profitable; + bool suppressed; +}; + + +/** + * Initialize database connection. + * + * @param cfg configuration to use + * @param skip_preflight true if we should skip the usual + * preflight check which assures us that the DB is actually + * operational; only taler-auditor-dbinit should use true here. + * @return NULL on failure + */ +struct TALER_AUDITORDB_PostgresContext * +TALER_AUDITORDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, + bool skip_preflight); + + +/** + * Shutdown the database connection. + * + * @param[in] pg connection to disconnect + */ +void +TALER_AUDITORDB_disconnect (struct TALER_AUDITORDB_PostgresContext *pg); + + +#endif diff --git a/src/include/exchange-database/abort_shard.h b/src/include/exchange-database/abort_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_ABORT_SHARD_H #define EXCHANGE_DATABASE_ABORT_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/account_history.h b/src/include/exchange-database/account_history.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/activate_signing_key.h b/src/include/exchange-database/activate_signing_key.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_ACTIVATE_SIGNING_KEY_H #define EXCHANGE_DATABASE_ACTIVATE_SIGNING_KEY_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/add_denomination_key.h b/src/include/exchange-database/add_denomination_key.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ADD_DENOMINATION_KEY_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/add_policy_fulfillment_proof.h b/src/include/exchange-database/add_policy_fulfillment_proof.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_ADD_POLICY_FULFILLMENT_PROOF_H #define EXCHANGE_DATABASE_ADD_POLICY_FULFILLMENT_PROOF_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_extensions_policy.h" diff --git a/src/include/exchange-database/aggregate.h b/src/include/exchange-database/aggregate.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Aggregate all matching deposits for @a h_payto and diff --git a/src/include/exchange-database/batch_ensure_coin_known.h b/src/include/exchange-database/batch_ensure_coin_known.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_BATCH_ENSURE_COIN_KNOWN_H #define EXCHANGE_DATABASE_BATCH_ENSURE_COIN_KNOWN_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/begin_revolving_shard.h b/src/include/exchange-database/begin_revolving_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_BEGIN_REVOLVING_SHARD_H #define EXCHANGE_DATABASE_BEGIN_REVOLVING_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/begin_shard.h b/src/include/exchange-database/begin_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_BEGIN_SHARD_H #define EXCHANGE_DATABASE_BEGIN_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called to grab a work shard on an operation @a op. Runs in its diff --git a/src/include/exchange-database/clear_aml_lock.h b/src/include/exchange-database/clear_aml_lock.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_CLEAR_AML_LOCK_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/commit.h b/src/include/exchange-database/commit.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_COMMIT_H #define EXCHANGE_DATABASE_COMMIT_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/complete_shard.h b/src/include/exchange-database/complete_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_COMPLETE_SHARD_H #define EXCHANGE_DATABASE_COMPLETE_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/compute_shard.h b/src/include/exchange-database/compute_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_COMPUTE_SHARD_H #define EXCHANGE_DATABASE_COMPUTE_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/count_known_coins.h b/src/include/exchange-database/count_known_coins.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_COUNT_KNOWN_COINS_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Count the number of known coins by denomination. diff --git a/src/include/exchange-database/create_aggregation_transient.h b/src/include/exchange-database/create_aggregation_transient.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Create a new entry in the transient aggregation table. diff --git a/src/include/exchange-database/create_tables.h b/src/include/exchange-database/create_tables.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/delete_aggregation_transient.h b/src/include/exchange-database/delete_aggregation_transient.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_DELETE_AGGREGATION_TRANSIENT_H #define EXCHANGE_DATABASE_DELETE_AGGREGATION_TRANSIENT_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/delete_shard_locks.h b/src/include/exchange-database/delete_shard_locks.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called to delete all revolving shards. diff --git a/src/include/exchange-database/disable_rules.h b/src/include/exchange-database/disable_rules.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_DISABLE_RULES_H #define EXCHANGE_DATABASE_DISABLE_RULES_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_check_deposit_idempotent.h b/src/include/exchange-database/do_check_deposit_idempotent.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DO_CHECK_DEPOSIT_IDEMPOTENT_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_deposit.h b/src/include/exchange-database/do_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_purse_delete.h b/src/include/exchange-database/do_purse_delete.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_DO_PURSE_DELETE_H #define EXCHANGE_DATABASE_DO_PURSE_DELETE_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_purse_deposit.h b/src/include/exchange-database/do_purse_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_purse_merge.h b/src/include/exchange-database/do_purse_merge.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DO_PURSE_MERGE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_recoup.h b/src/include/exchange-database/do_recoup.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DO_RECOUP_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Perform recoup operation, checking for sufficient deposits diff --git a/src/include/exchange-database/do_recoup_refresh.h b/src/include/exchange-database/do_recoup_refresh.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DO_RECOUP_REFRESH_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_refresh.h b/src/include/exchange-database/do_refresh.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Perform refresh operation--introduced with v26 of the API--, diff --git a/src/include/exchange-database/do_reserve_open.h b/src/include/exchange-database/do_reserve_open.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/do_reserve_purse.h b/src/include/exchange-database/do_reserve_purse.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called insert request to merge a purse into a reserve by the diff --git a/src/include/exchange-database/do_withdraw.h b/src/include/exchange-database/do_withdraw.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DO_WITHDRAW_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/free_reserve_history.h" /** diff --git a/src/include/exchange-database/drain_kyc_alert.h b/src/include/exchange-database/drain_kyc_alert.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_DRAIN_KYC_ALERT_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Extract next KYC alert. Deletes the alert. diff --git a/src/include/exchange-database/drop_tables.h b/src/include/exchange-database/drop_tables.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/enable_rules.h b/src/include/exchange-database/enable_rules.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/ensure_coin_known.h b/src/include/exchange-database/ensure_coin_known.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_ENSURE_COIN_KNOWN_H #define EXCHANGE_DATABASE_ENSURE_COIN_KNOWN_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Possible status codes from making sure a coin is known. diff --git a/src/include/exchange-database/event_listen.h b/src/include/exchange-database/event_listen.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_EVENT_LISTEN_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Register callback to be invoked on events of type @a es. diff --git a/src/include/exchange-database/event_listen_cancel.h b/src/include/exchange-database/event_listen_cancel.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_EVENT_LISTEN_CANCEL_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/event_notify.h b/src/include/exchange-database/event_notify.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_EVENT_NOTIFY_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/expire_purse.h b/src/include/exchange-database/expire_purse.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_EXPIRE_PURSE_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called to clean up one expired purse. diff --git a/src/include/exchange-database/find_aggregation_transient.h b/src/include/exchange-database/find_aggregation_transient.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Find existing entry in the transient aggregation table. diff --git a/src/include/exchange-database/free_coin_transaction_list.h b/src/include/exchange-database/free_coin_transaction_list.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_FREE_COIN_TRANSACTION_LIST_H #define EXCHANGE_DATABASE_FREE_COIN_TRANSACTION_LIST_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/free_reserve_history.h b/src/include/exchange-database/free_reserve_history.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/gc.h b/src/include/exchange-database/gc.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_coin_denomination.h b/src/include/exchange-database/get_coin_denomination.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_COIN_DENOMINATION_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Retrieve the denomination of a known coin. diff --git a/src/include/exchange-database/get_coin_transactions.h b/src/include/exchange-database/get_coin_transactions.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_COIN_TRANSACTIONS_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/free_coin_transaction_list.h" diff --git a/src/include/exchange-database/get_denomination_by_serial.h b/src/include/exchange-database/get_denomination_by_serial.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_DENOMINATION_BY_SERIAL_H #define EXCHANGE_DATABASE_GET_DENOMINATION_BY_SERIAL_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Fetch information about a denomination for a given serial. diff --git a/src/include/exchange-database/get_denomination_info.h b/src/include/exchange-database/get_denomination_info.h @@ -23,7 +23,7 @@ #define EXCHANGE_DATABASE_GET_DENOMINATION_INFO_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Fetch information about a denomination key. diff --git a/src/include/exchange-database/get_denomination_revocation.h b/src/include/exchange-database/get_denomination_revocation.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_DENOMINATION_REVOCATION_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_drain_profit.h b/src/include/exchange-database/get_drain_profit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_expired_reserves.h b/src/include/exchange-database/get_expired_reserves.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/get_extension_manifest.h b/src/include/exchange-database/get_extension_manifest.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_EXTENSION_MANIFEST_H #define EXCHANGE_DATABASE_GET_EXTENSION_MANIFEST_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_global_fee.h b/src/include/exchange-database/get_global_fee.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Obtain global fees from database. diff --git a/src/include/exchange-database/get_global_fees.h b/src/include/exchange-database/get_global_fees.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_known_coin.h b/src/include/exchange-database/get_known_coin.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_KNOWN_COIN_H #define EXCHANGE_DATABASE_GET_KNOWN_COIN_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Retrieve the record for a known coin. diff --git a/src/include/exchange-database/get_kyc_rules.h b/src/include/exchange-database/get_kyc_rules.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_KYC_RULES_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_old_coin_by_h_blind.h b/src/include/exchange-database/get_old_coin_by_h_blind.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_OLD_COIN_BY_H_BLIND_H #define EXCHANGE_DATABASE_GET_OLD_COIN_BY_H_BLIND_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_pending_kyc_requirement_process.h b/src/include/exchange-database/get_pending_kyc_requirement_process.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_PENDING_KYC_REQUIREMENT_PROCESS_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_policy_details.h b/src/include/exchange-database/get_policy_details.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_POLICY_DETAILS_H #define EXCHANGE_DATABASE_GET_POLICY_DETAILS_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_extensions_policy.h" diff --git a/src/include/exchange-database/get_purse_deposit.h b/src/include/exchange-database/get_purse_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_purse_request.h b/src/include/exchange-database/get_purse_request.h @@ -25,7 +25,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_ready_deposit.h b/src/include/exchange-database/get_ready_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_refresh.h b/src/include/exchange-database/get_refresh.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_REFRESH_H #define EXCHANGE_DATABASE_GET_REFRESH_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Lookup refresh refresh commitment data under the given @a rc. diff --git a/src/include/exchange-database/get_reserve_balance.h b/src/include/exchange-database/get_reserve_balance.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Get the balance of the specified reserve. diff --git a/src/include/exchange-database/get_reserve_by_h_planchets.h b/src/include/exchange-database/get_reserve_by_h_planchets.h @@ -23,7 +23,7 @@ #define EXCHANGE_DATABASE_GET_RESERVE_BY_H_PLANCHETS_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Obtain information about which reserve a coin was generated diff --git a/src/include/exchange-database/get_reserve_history.h b/src/include/exchange-database/get_reserve_history.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_RESERVE_HISTORY_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/free_reserve_history.h" diff --git a/src/include/exchange-database/get_signature_for_known_coin.h b/src/include/exchange-database/get_signature_for_known_coin.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_SIGNATURE_FOR_KNOWN_COIN_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Retrieve the denomination and the corresponding signature for a known coin. diff --git a/src/include/exchange-database/get_unfinished_close_requests.h b/src/include/exchange-database/get_unfinished_close_requests.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/get_wire_accounts.h b/src/include/exchange-database/get_wire_accounts.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_wire_fee.h b/src/include/exchange-database/get_wire_fee.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_WIRE_FEE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_wire_fees.h b/src/include/exchange-database/get_wire_fees.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_wire_hash_for_contract.h b/src/include/exchange-database/get_wire_hash_for_contract.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_GET_WIRE_HASH_FOR_CONTRACT_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/get_withdraw.h b/src/include/exchange-database/get_withdraw.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_GET_WITHDRAW_H #define EXCHANGE_DATABASE_GET_WITHDRAW_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/free_reserve_history.h" diff --git a/src/include/exchange-database/have_deposit2.h b/src/include/exchange-database/have_deposit2.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/inject_auditor_triggers.h b/src/include/exchange-database/inject_auditor_triggers.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_active_legitimization_measure.h b/src/include/exchange-database/insert_active_legitimization_measure.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_INSERT_ACTIVE_LEGITIMIZATION_MEASURE_H #define EXCHANGE_DATABASE_INSERT_ACTIVE_LEGITIMIZATION_MEASURE_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_aml_decision.h b/src/include/exchange-database/insert_aml_decision.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_aml_officer.h b/src/include/exchange-database/insert_aml_officer.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_AML_OFFICER_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_aml_program_failure.h b/src/include/exchange-database/insert_aml_program_failure.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_auditor.h b/src/include/exchange-database/insert_auditor.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_AUDITOR_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_auditor_denom_sig.h b/src/include/exchange-database/insert_auditor_denom_sig.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_AUDITOR_DENOM_SIG_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_close_request.h b/src/include/exchange-database/insert_close_request.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_contract.h b/src/include/exchange-database/insert_contract.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_CONTRACT_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_denomination_info.h b/src/include/exchange-database/insert_denomination_info.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_DENOMINATION_INFO_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Insert a denomination key's public information into the database for diff --git a/src/include/exchange-database/insert_denomination_revocation.h b/src/include/exchange-database/insert_denomination_revocation.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_DENOMINATION_REVOCATION_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_drain_profit.h b/src/include/exchange-database/insert_drain_profit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_global_fee.h b/src/include/exchange-database/insert_global_fee.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_kyc_failure.h b/src/include/exchange-database/insert_kyc_failure.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_kyc_requirement_process.h b/src/include/exchange-database/insert_kyc_requirement_process.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_KYC_REQUIREMENT_PROCESS_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_partner.h b/src/include/exchange-database/insert_partner.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called to store configuration data about a partner diff --git a/src/include/exchange-database/insert_purse_request.h b/src/include/exchange-database/insert_purse_request.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_records_by_table.h b/src/include/exchange-database/insert_records_by_table.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_INSERT_RECORDS_BY_TABLE_H #define EXCHANGE_DATABASE_INSERT_RECORDS_BY_TABLE_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/lookup_records_by_table.h" diff --git a/src/include/exchange-database/insert_refund.h b/src/include/exchange-database/insert_refund.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_INSERT_REFUND_H #define EXCHANGE_DATABASE_INSERT_REFUND_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/do_refund.h" /** diff --git a/src/include/exchange-database/insert_reserve_closed.h b/src/include/exchange-database/insert_reserve_closed.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_reserve_open_deposit.h b/src/include/exchange-database/insert_reserve_open_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_sanction_list_hit.h b/src/include/exchange-database/insert_sanction_list_hit.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_SANCTION_LIST_HIT_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_signkey_revocation.h b/src/include/exchange-database/insert_signkey_revocation.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_INSERT_SIGNKEY_REVOCATION_H #define EXCHANGE_DATABASE_INSERT_SIGNKEY_REVOCATION_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_successor_measure.h b/src/include/exchange-database/insert_successor_measure.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_SUCCESSOR_MEASURE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" enum GNUNET_DB_QueryStatus diff --git a/src/include/exchange-database/insert_wire.h b/src/include/exchange-database/insert_wire.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/insert_wire_fee.h b/src/include/exchange-database/insert_wire_fee.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_INSERT_WIRE_FEE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_active_auditors.h b/src/include/exchange-database/iterate_active_auditors.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ITERATE_ACTIVE_AUDITORS_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_active_signkeys.h b/src/include/exchange-database/iterate_active_signkeys.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ITERATE_ACTIVE_SIGNKEYS_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_auditor_denominations.h b/src/include/exchange-database/iterate_auditor_denominations.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ITERATE_AUDITOR_DENOMINATIONS_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_denomination_info.h b/src/include/exchange-database/iterate_denomination_info.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ITERATE_DENOMINATION_INFO_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_denominations.h b/src/include/exchange-database/iterate_denominations.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ITERATE_DENOMINATIONS_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_kyc_reference.h b/src/include/exchange-database/iterate_kyc_reference.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/iterate_reserve_close_info.h b/src/include/exchange-database/iterate_reserve_close_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/kyc_provider_account_lookup.h b/src/include/exchange-database/kyc_provider_account_lookup.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_KYC_PROVIDER_ACCOUNT_LOOKUP_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/kycauth_in_insert.h b/src/include/exchange-database/kycauth_in_insert.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_active_legitimization.h b/src/include/exchange-database/lookup_active_legitimization.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_ACTIVE_LEGITIMIZATION_H #define EXCHANGE_DATABASE_LOOKUP_ACTIVE_LEGITIMIZATION_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_aml_file_number.h b/src/include/exchange-database/lookup_aml_file_number.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_AML_FILE_NUMBER_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_aml_history.h b/src/include/exchange-database/lookup_aml_history.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_aml_officer.h b/src/include/exchange-database/lookup_aml_officer.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_AML_OFFICER_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_auditor_status.h b/src/include/exchange-database/lookup_auditor_status.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_AUDITOR_STATUS_H #define EXCHANGE_DATABASE_LOOKUP_AUDITOR_STATUS_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Lookup current state of an auditor. diff --git a/src/include/exchange-database/lookup_auditor_timestamp.h b/src/include/exchange-database/lookup_auditor_timestamp.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_AUDITOR_TIMESTAMP_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_completed_legitimization.h b/src/include/exchange-database/lookup_completed_legitimization.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_denomination_key.h b/src/include/exchange-database/lookup_denomination_key.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_DENOMINATION_KEY_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Lookup information about current denomination key. diff --git a/src/include/exchange-database/lookup_global_fee_by_time.h b/src/include/exchange-database/lookup_global_fee_by_time.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_h_payto_by_access_token.h b/src/include/exchange-database/lookup_h_payto_by_access_token.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_H_PAYTO_BY_ACCESS_TOKEN_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_kyc_history.h b/src/include/exchange-database/lookup_kyc_history.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_kyc_process_by_account.h b/src/include/exchange-database/lookup_kyc_process_by_account.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_kyc_requirement_by_row.h b/src/include/exchange-database/lookup_kyc_requirement_by_row.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_kyc_status_by_token.h b/src/include/exchange-database/lookup_kyc_status_by_token.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_KYC_STATUS_BY_TOKEN_H #define EXCHANGE_DATABASE_LOOKUP_KYC_STATUS_BY_TOKEN_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_pending_legitimization.h b/src/include/exchange-database/lookup_pending_legitimization.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_PENDING_LEGITIMIZATION_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_records_by_table.h b/src/include/exchange-database/lookup_records_by_table.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_RECORDS_BY_TABLE_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_rules_by_access_token.h b/src/include/exchange-database/lookup_rules_by_access_token.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_RULES_BY_ACCESS_TOKEN_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_serial_by_table.h b/src/include/exchange-database/lookup_serial_by_table.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_SERIAL_BY_TABLE_H #define EXCHANGE_DATABASE_LOOKUP_SERIAL_BY_TABLE_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/lookup_records_by_table.h" /** diff --git a/src/include/exchange-database/lookup_signing_key.h b/src/include/exchange-database/lookup_signing_key.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_SIGNING_KEY_H #define EXCHANGE_DATABASE_LOOKUP_SIGNING_KEY_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_signkey_revocation.h b/src/include/exchange-database/lookup_signkey_revocation.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_LOOKUP_SIGNKEY_REVOCATION_H #define EXCHANGE_DATABASE_LOOKUP_SIGNKEY_REVOCATION_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_transfer_by_deposit.h b/src/include/exchange-database/lookup_transfer_by_deposit.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_wire_fee_by_time.h b/src/include/exchange-database/lookup_wire_fee_by_time.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_LOOKUP_WIRE_FEE_BY_TIME_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_wire_timestamp.h b/src/include/exchange-database/lookup_wire_timestamp.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/lookup_wire_transfer.h b/src/include/exchange-database/lookup_wire_transfer.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/mark_refresh_reveal_success.h b/src/include/exchange-database/mark_refresh_reveal_success.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_MARK_REFRESH_REVEAL_SUCCESS_H #define EXCHANGE_DATABASE_MARK_REFRESH_REVEAL_SUCCESS_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/persist_aml_program_result.h b/src/include/exchange-database/persist_aml_program_result.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/set_aml_lock.h" #include "exchange-database/clear_aml_lock.h" diff --git a/src/include/exchange-database/persist_kyc_attributes.h b/src/include/exchange-database/persist_kyc_attributes.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/persist_policy_details.h b/src/include/exchange-database/persist_policy_details.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "taler/taler_extensions_policy.h" diff --git a/src/include/exchange-database/preflight.h b/src/include/exchange-database/preflight.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/profit_drains_get_pending.h b/src/include/exchange-database/profit_drains_get_pending.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/profit_drains_set_finished.h b/src/include/exchange-database/profit_drains_set_finished.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_PROFIT_DRAINS_SET_FINISHED_H #define EXCHANGE_DATABASE_PROFIT_DRAINS_SET_FINISHED_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/release_revolving_shard.h b/src/include/exchange-database/release_revolving_shard.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_RELEASE_REVOLVING_SHARD_H #define EXCHANGE_DATABASE_RELEASE_REVOLVING_SHARD_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called to release a revolving shard diff --git a/src/include/exchange-database/reserves_get.h b/src/include/exchange-database/reserves_get.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_RESERVES_GET_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Get the summary of a reserve. diff --git a/src/include/exchange-database/reserves_get_origin.h b/src/include/exchange-database/reserves_get_origin.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Get the origin of funds of a reserve. diff --git a/src/include/exchange-database/reserves_in_insert.h b/src/include/exchange-database/reserves_in_insert.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_RESERVES_IN_INSERT_H #define EXCHANGE_DATABASE_RESERVES_IN_INSERT_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" struct TALER_EXCHANGEDB_ReserveInInfo diff --git a/src/include/exchange-database/reserves_update.h b/src/include/exchange-database/reserves_update.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_RESERVES_UPDATE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/rollback.h b/src/include/exchange-database/rollback.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_ROLLBACK_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_account_merges_above_serial_id.h b/src/include/exchange-database/select_account_merges_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Function called with details about diff --git a/src/include/exchange-database/select_aggregation_amounts_for_kyc_check.h b/src/include/exchange-database/select_aggregation_amounts_for_kyc_check.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aggregation_transient.h b/src/include/exchange-database/select_aggregation_transient.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aggregations_above_serial.h b/src/include/exchange-database/select_aggregations_above_serial.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_all_kyc_attributes.h b/src/include/exchange-database/select_all_kyc_attributes.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_all_purse_decisions_above_serial_id.h b/src/include/exchange-database/select_all_purse_decisions_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_all_purse_deletions_above_serial_id.h b/src/include/exchange-database/select_all_purse_deletions_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aml_attributes.h b/src/include/exchange-database/select_aml_attributes.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aml_decisions.h b/src/include/exchange-database/select_aml_decisions.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aml_measures.h b/src/include/exchange-database/select_aml_measures.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_aml_statistics.h b/src/include/exchange-database/select_aml_statistics.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_auditor_denom_sig.h b/src/include/exchange-database/select_auditor_denom_sig.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_SELECT_AUDITOR_DENOM_SIG_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Select information about an auditor auditing a denomination key. diff --git a/src/include/exchange-database/select_batch_deposits_missing_wire.h b/src/include/exchange-database/select_batch_deposits_missing_wire.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_coin_deposits_above_serial_id.h b/src/include/exchange-database/select_coin_deposits_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_contract.h b/src/include/exchange-database/select_contract.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_SELECT_CONTRACT_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_contract_by_purse.h b/src/include/exchange-database/select_contract_by_purse.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_SELECT_CONTRACT_BY_PURSE_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_deposit_amounts_for_kyc_check.h b/src/include/exchange-database/select_deposit_amounts_for_kyc_check.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_exchange_credit_transfers.h b/src/include/exchange-database/select_exchange_credit_transfers.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_exchange_debit_transfers.h b/src/include/exchange-database/select_exchange_debit_transfers.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_exchange_kycauth_transfers.h b/src/include/exchange-database/select_exchange_kycauth_transfers.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_kyc_accounts.h b/src/include/exchange-database/select_kyc_accounts.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_kyc_attributes.h b/src/include/exchange-database/select_kyc_attributes.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_merge_amounts_for_kyc_check.h b/src/include/exchange-database/select_merge_amounts_for_kyc_check.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse.h b/src/include/exchange-database/select_purse.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_by_merge_pub.h b/src/include/exchange-database/select_purse_by_merge_pub.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_decisions_above_serial_id.h b/src/include/exchange-database/select_purse_decisions_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_deposits_above_serial_id.h b/src/include/exchange-database/select_purse_deposits_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_deposits_by_purse.h b/src/include/exchange-database/select_purse_deposits_by_purse.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_merge.h b/src/include/exchange-database/select_purse_merge.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_SELECT_PURSE_MERGE_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_merges_above_serial_id.h b/src/include/exchange-database/select_purse_merges_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_purse_requests_above_serial_id.h b/src/include/exchange-database/select_purse_requests_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_recoup_above_serial_id.h b/src/include/exchange-database/select_recoup_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_recoup_refresh_above_serial_id.h b/src/include/exchange-database/select_recoup_refresh_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_refreshes_above_serial_id.h b/src/include/exchange-database/select_refreshes_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_refunds_above_serial_id.h b/src/include/exchange-database/select_refunds_above_serial_id.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_SELECT_REFUNDS_ABOVE_SERIAL_ID_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/do_refund.h" diff --git a/src/include/exchange-database/select_refunds_by_coin.h b/src/include/exchange-database/select_refunds_by_coin.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_reserve_close_info.h b/src/include/exchange-database/select_reserve_close_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_reserve_close_request_info.h b/src/include/exchange-database/select_reserve_close_request_info.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_reserve_closed_above_serial_id.h b/src/include/exchange-database/select_reserve_closed_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_reserve_open_above_serial_id.h b/src/include/exchange-database/select_reserve_open_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_reserves_in_above_serial_id.h b/src/include/exchange-database/select_reserves_in_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_reserves_in_above_serial_id_by_account.h b/src/include/exchange-database/select_reserves_in_above_serial_id_by_account.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_wire_out_above_serial_id.h b/src/include/exchange-database/select_wire_out_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_wire_out_above_serial_id_by_account.h b/src/include/exchange-database/select_wire_out_above_serial_id_by_account.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /* Callback typedefs */ diff --git a/src/include/exchange-database/select_withdraw_amounts_for_kyc_check.h b/src/include/exchange-database/select_withdraw_amounts_for_kyc_check.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/select_withdrawals_above_serial_id.h b/src/include/exchange-database/select_withdrawals_above_serial_id.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/set_aml_lock.h b/src/include/exchange-database/set_aml_lock.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/set_extension_manifest.h b/src/include/exchange-database/set_extension_manifest.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_SET_EXTENSION_MANIFEST_H #define EXCHANGE_DATABASE_SET_EXTENSION_MANIFEST_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/set_purse_balance.h b/src/include/exchange-database/set_purse_balance.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Set the current @a balance in the purse diff --git a/src/include/exchange-database/start.h b/src/include/exchange-database/start.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/start_deferred_wire_out.h b/src/include/exchange-database/start_deferred_wire_out.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/start_read_committed.h b/src/include/exchange-database/start_read_committed.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Start a READ COMMITTED transaction. diff --git a/src/include/exchange-database/start_read_only.h b/src/include/exchange-database/start_read_only.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/store_wire_transfer_out.h b/src/include/exchange-database/store_wire_transfer_out.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Store information about an outgoing wire transfer that was executed. diff --git a/src/include/exchange-database/test_aml_officer.h b/src/include/exchange-database/test_aml_officer.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_TEST_AML_OFFICER_H #define EXCHANGE_DATABASE_TEST_AML_OFFICER_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/trigger_kyc_rule_for_account.h b/src/include/exchange-database/trigger_kyc_rule_for_account.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/update_aggregation_transient.h b/src/include/exchange-database/update_aggregation_transient.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/update_auditor.h b/src/include/exchange-database/update_auditor.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_UPDATE_AUDITOR_H #include "taler/taler_util.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** * Update information about an auditor that will audit this exchange. diff --git a/src/include/exchange-database/update_kyc_process_by_row.h b/src/include/exchange-database/update_kyc_process_by_row.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/update_rules.h b/src/include/exchange-database/update_rules.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/update_wire.h b/src/include/exchange-database/update_wire.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/wad_in_insert.h b/src/include/exchange-database/wad_in_insert.h @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/wire_prepare_data_get.h b/src/include/exchange-database/wire_prepare_data_get.h @@ -22,7 +22,7 @@ #define EXCHANGE_DATABASE_WIRE_PREPARE_DATA_GET_H #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/wire_prepare_data_insert.h b/src/include/exchange-database/wire_prepare_data_insert.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_WIRE_PREPARE_DATA_INSERT_H #define EXCHANGE_DATABASE_WIRE_PREPARE_DATA_INSERT_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/wire_prepare_data_mark_failed.h b/src/include/exchange-database/wire_prepare_data_mark_failed.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_WIRE_PREPARE_DATA_MARK_FAILED_H #define EXCHANGE_DATABASE_WIRE_PREPARE_DATA_MARK_FAILED_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchange-database/wire_prepare_data_mark_finished.h b/src/include/exchange-database/wire_prepare_data_mark_finished.h @@ -21,7 +21,7 @@ #ifndef EXCHANGE_DATABASE_WIRE_PREPARE_DATA_MARK_FINISHED_H #define EXCHANGE_DATABASE_WIRE_PREPARE_DATA_MARK_FINISHED_H -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" /** diff --git a/src/include/exchangedb_lib.h b/src/include/exchangedb_lib.h @@ -0,0 +1,1133 @@ +/* + This file is part of TALER + Copyright (C) 2014-2020 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +*/ +/** + * @file include/exchangedb_lib.h + * @brief IO operations for the exchange's private keys + * @author Florian Dold + * @author Benedikt Mueller + * @author Christian Grothoff + */ +#ifndef TALER_EXCHANGEDB_LIB_H +#define TALER_EXCHANGEDB_LIB_H + +#include <taler/taler_signatures.h> +#include <taler/taler_bank_service.h> +#include <taler/taler_kyclogic_lib.h> +#include <taler/taler_util.h> + + +/** + * Detailed status for persisting an AML program result. + */ +enum TALER_EXCHANGEDB_PersistProgramResultStatus +{ + TALER_EXCHANGEDB_PPRS_OK = 0, + TALER_EXCHANGEDB_PPRS_BAD_OUTCOME = 1, +}; + + +/** + * Information about a denomination key. + */ +struct TALER_EXCHANGEDB_DenominationKeyInformation +{ + + /** + * Signature over this struct to affirm the validity of the key. + */ + struct TALER_MasterSignatureP signature; + + /** + * Start time of the validity period for this key. + */ + struct GNUNET_TIME_Timestamp start; + + /** + * The exchange will sign fresh coins between @e start and this time. + * @e expire_withdraw will be somewhat larger than @e start to + * ensure a sufficiently large anonymity set, while also allowing + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges + * with high transaction volume. The period may also differ between + * types of coins. A exchange may also have a few denomination keys + * with the same value with overlapping validity periods, to address + * issues such as clock skew. + */ + struct GNUNET_TIME_Timestamp expire_withdraw; + + /** + * Coins signed with the denomination key must be spent or refreshed + * between @e start and this expiration time. After this time, the + * exchange will refuse transactions involving this key as it will + * "drop" the table with double-spending information (shortly after) + * this time. Note that wallets should refresh coins significantly + * before this time to be on the safe side. @e expire_deposit must be + * significantly larger than @e expire_withdraw (by months or even + * years). + */ + struct GNUNET_TIME_Timestamp expire_deposit; + + /** + * When do signatures with this denomination key become invalid? + * After this point, these signatures cannot be used in (legal) + * disputes anymore, as the Exchange is then allowed to destroy its side + * of the evidence. @e expire_legal is expected to be significantly + * larger than @e expire_deposit (by a year or more). + */ + struct GNUNET_TIME_Timestamp expire_legal; + + /** + * The value of the coins signed with this denomination key. + */ + struct TALER_Amount value; + + /** + * Fees for the coin. + */ + struct TALER_DenomFeeSet fees; + + /** + * Hash code of the denomination public key. (Used to avoid having + * the variable-size RSA key in this struct.) + */ + struct TALER_DenominationHashP denom_hash; + + /** + * If denomination was setup for age restriction, non-zero age mask. + * Note that the mask is not part of the signature. + */ + struct TALER_AgeMask age_mask; +}; + + +GNUNET_NETWORK_STRUCT_BEGIN + +/** + * Events signalling that a coin deposit status + * changed. + */ +struct TALER_EXCHANGEDB_CoinDepositEventP +{ + /** + * Of type #TALER_DBEVENT_EXCHANGE_DEPOSIT_STATUS_CHANGED. + */ + struct GNUNET_DB_EventHeaderP header; + + /** + * Public key of the merchant. + */ + struct TALER_MerchantPublicKeyP merchant_pub; + +}; + +/** + * Events signalling a reserve got funding. + */ +struct TALER_EXCHANGEDB_ReserveEventP +{ + /** + * Of type #TALER_DBEVENT_EXCHANGE_RESERVE_INCOMING. + */ + struct GNUNET_DB_EventHeaderP header; + + /** + * Public key of the reserve the event is about. + */ + struct TALER_ReservePublicKeyP reserve_pub; +}; + + +/** + * Signature of events signalling a purse changed its status. + */ +struct TALER_EXCHANGEDB_PurseEventP +{ + /** + * Of type #TALER_DBEVENT_EXCHANGE_PURSE_MERGED or + * #TALER_DBEVENT_EXCHANGE_PURSE_DEPOSITED. + */ + struct GNUNET_DB_EventHeaderP header; + + /** + * Public key of the purse the event is about. + */ + struct TALER_PurseContractPublicKeyP purse_pub; +}; + + +/** + * Signature of events signalling a KYC process was completed. + */ +struct TALER_EXCHANGEDB_KycCompletedEventP +{ + /** + * Of type #TALER_DBEVENT_EXCHANGE_KYC_COMPLETED. + */ + struct GNUNET_DB_EventHeaderP header; + + /** + * Hash of payto://-URI for which the KYC state changed. + */ + struct TALER_NormalizedPaytoHashP h_payto; +}; + + +GNUNET_NETWORK_STRUCT_END + +/** + * Meta data about an exchange online signing key. + */ +struct TALER_EXCHANGEDB_SignkeyMetaData +{ + /** + * Start time of the validity period for this key. + */ + struct GNUNET_TIME_Timestamp start; + + /** + * The exchange will sign messages with this key between @e start and this time. + */ + struct GNUNET_TIME_Timestamp expire_sign; + + /** + * When do signatures with this sign key become invalid? + * After this point, these signatures cannot be used in (legal) + * disputes anymore, as the Exchange is then allowed to destroy its side + * of the evidence. @e expire_legal is expected to be significantly + * larger than @e expire_sign (by a year or more). + */ + struct GNUNET_TIME_Timestamp expire_legal; + +}; + + +/** + * @brief All information about a denomination key (which is used to + * sign coins into existence). + */ +struct TALER_EXCHANGEDB_DenominationKey +{ + /** + * The private key of the denomination. Will be NULL if the private + * key is not available (this is the case after the key has expired + * for signing coins, but is still valid for depositing coins). + */ + struct TALER_DenominationPrivateKey denom_priv; + + /** + * Decoded denomination public key (the hash of it is in + * @e issue, but we sometimes need the full public key as well). + */ + struct TALER_DenominationPublicKey denom_pub; + + /** + * Signed public information about a denomination key. + */ + struct TALER_EXCHANGEDB_DenominationKeyInformation issue; +}; + + +/** + * @brief A summary of a Reserve + */ +struct TALER_EXCHANGEDB_Reserve +{ + /** + * The reserve's public key. This uniquely identifies the reserve + */ + struct TALER_ReservePublicKeyP pub; + + /** + * The balance amount existing in the reserve + */ + struct TALER_Amount balance; + + /** + * The expiration date of this reserve; funds will be wired back + * at this time. + */ + struct GNUNET_TIME_Timestamp expiry; + + /** + * The legal expiration date of this reserve; we will forget about + * it at this time. + */ + struct GNUNET_TIME_Timestamp gc; +}; + + +/** + * Public key to which a nonce is locked. + */ +union TALER_EXCHANGEDB_NonceLockTargetP +{ + /** + * Nonce is locked to this coin key. + */ + struct TALER_CoinSpendPublicKeyP coin; + + /** + * Nonce is locked to this reserve key. + */ + struct TALER_ReservePublicKeyP reserve; +}; + + +/** + * @brief Data about a coin for a deposit operation. + */ +struct TALER_EXCHANGEDB_CoinDepositInformation +{ + /** + * Information about the coin that is being deposited. + */ + struct TALER_CoinPublicInfo coin; + + /** + * ECDSA signature affirming that the customer intends + * this coin to be deposited at the merchant identified + * by @e h_wire in relation to the proposal data identified + * by @e h_contract_terms. + */ + struct TALER_CoinSpendSignatureP csig; + + /** + * Fraction of the coin's remaining value to be deposited, including + * depositing fee (if any). The coin is identified by @e coin_pub. + */ + struct TALER_Amount amount_with_fee; + +}; + + +/** + * @brief Data from a batch deposit operation. + */ +struct TALER_EXCHANGEDB_BatchDeposit +{ + + /** + * Public key of the merchant. Enables later identification + * of the merchant in case of a need to rollback transactions. + */ + struct TALER_MerchantPublicKeyP merchant_pub; + + /** + * Signature of the merchant over the contract, of purpose + * #TALER_SIGNATURE_MERCHANT_CONTRACT. + */ + struct TALER_MerchantSignatureP merchant_sig; + + /** + * Hash over the proposal data between merchant and customer + * (remains unknown to the Exchange). + */ + struct TALER_PrivateContractHashP h_contract_terms; + + /** + * Hash over additional inputs by the wallet. + */ + struct GNUNET_HashCode wallet_data_hash; + + /** + * Unsalted hash over @e receiver_wire_account. + */ + struct TALER_FullPaytoHashP wire_target_h_payto; + + /** + * Salt used by the merchant to compute "h_wire". + */ + struct TALER_WireSaltP wire_salt; + + /** + * Time when this request was generated. Used, for example, to + * assess when (roughly) the income was achieved for tax purposes. + * Note that the Exchange will only check that the timestamp is not "too + * far" into the future (i.e. several days). The fact that the + * timestamp falls within the validity period of the coin's + * denomination key is irrelevant for the validity of the deposit + * request, as obviously the customer and merchant could conspire to + * set any timestamp. Also, the Exchange must accept very old deposit + * requests, as the merchant might have been unable to transmit the + * deposit request in a timely fashion (so back-dating is not + * prevented). + */ + struct GNUNET_TIME_Timestamp wallet_timestamp; + + /** + * How much time does the merchant have to issue a refund request? + * Zero if refunds are not allowed. After this time, the coin + * cannot be refunded. + */ + struct GNUNET_TIME_Timestamp refund_deadline; + + /** + * How much time does the merchant have to execute the wire transfer? + * This time is advisory for aggregating transactions, not a hard + * constraint (as the merchant can theoretically pick any time, + * including one in the past). + */ + struct GNUNET_TIME_Timestamp wire_deadline; + + /** + * Row ID of the policy details; 0 if no policy applies. + */ + uint64_t policy_details_serial_id; + + /** + * Information about the receiver for executing the transaction. URI in + * payto://-format. + */ + struct TALER_FullPayto receiver_wire_account; + + /** + * Optional extra information to include in the wire transfer + * subject. + */ + const char *extra_wire_subject_metadata; + + /** + * Array about the coins that are being deposited. + */ + const struct TALER_EXCHANGEDB_CoinDepositInformation *cdis; + + /** + * Length of the @e cdis array. + */ + unsigned int num_cdis; + + /** + * False if @e wallet_data_hash was provided + */ + bool no_wallet_data_hash; + + /** + * True if further processing is blocked by policy. + */ + bool policy_blocked; + +}; + + +/** + * @brief Data from a deposit operation. The combination of + * the coin's public key, the merchant's public key and the + * transaction ID must be unique. While a coin can (theoretically) be + * deposited at the same merchant twice (with partial spending), the + * merchant must either use a different public key or a different + * transaction ID for the two transactions. The same coin must not + * be used twice at the same merchant for the same transaction + * (as determined by transaction ID). + */ +struct TALER_EXCHANGEDB_Deposit +{ + /** + * Information about the coin that is being deposited. + */ + struct TALER_CoinPublicInfo coin; + + /** + * ECDSA signature affirming that the customer intends + * this coin to be deposited at the merchant identified + * by @e h_wire in relation to the proposal data identified + * by @e h_contract_terms. + */ + struct TALER_CoinSpendSignatureP csig; + + /** + * Public key of the merchant. Enables later identification + * of the merchant in case of a need to rollback transactions. + */ + struct TALER_MerchantPublicKeyP merchant_pub; + + /** + * Hash over the proposal data between merchant and customer + * (remains unknown to the Exchange). + */ + struct TALER_PrivateContractHashP h_contract_terms; + + /** + * Salt used by the merchant to compute "h_wire". + */ + struct TALER_WireSaltP wire_salt; + + /** + * Hash over inputs from the wallet to customize the contract. + */ + struct GNUNET_HashCode wallet_data_hash; + + /** + * Hash over the policy data for this deposit (remains unknown to the + * Exchange). Needed for the verification of the deposit's signature + */ + struct TALER_ExtensionPolicyHashP h_policy; + + /** + * Time when this request was generated. Used, for example, to + * assess when (roughly) the income was achieved for tax purposes. + * Note that the Exchange will only check that the timestamp is not "too + * far" into the future (i.e. several days). The fact that the + * timestamp falls within the validity period of the coin's + * denomination key is irrelevant for the validity of the deposit + * request, as obviously the customer and merchant could conspire to + * set any timestamp. Also, the Exchange must accept very old deposit + * requests, as the merchant might have been unable to transmit the + * deposit request in a timely fashion (so back-dating is not + * prevented). + */ + struct GNUNET_TIME_Timestamp timestamp; + + /** + * How much time does the merchant have to issue a refund request? + * Zero if refunds are not allowed. After this time, the coin + * cannot be refunded. + */ + struct GNUNET_TIME_Timestamp refund_deadline; + + /** + * How much time does the merchant have to execute the wire transfer? + * This time is advisory for aggregating transactions, not a hard + * constraint (as the merchant can theoretically pick any time, + * including one in the past). + */ + struct GNUNET_TIME_Timestamp wire_deadline; + + /** + * Fraction of the coin's remaining value to be deposited, including + * depositing fee (if any). The coin is identified by @e coin_pub. + */ + struct TALER_Amount amount_with_fee; + + /** + * Depositing fee. + */ + struct TALER_Amount deposit_fee; + + /** + * Information about the receiver for executing the transaction. URI in + * payto://-format. + */ + struct TALER_FullPayto receiver_wire_account; + + /** + * True if @e policy_json was provided + */ + bool has_policy; + + /** + * True if @e wallet_data_hash is not in use. + */ + bool no_wallet_data_hash; + +}; + + +/** + * @brief Specification for coin in a melt operation. + */ +struct TALER_EXCHANGEDB_Refresh +{ + /** + * Information about the coin that is being melted. + */ + struct TALER_CoinPublicInfo coin; + + /** + * Signature over the melting operation. + */ + struct TALER_CoinSpendSignatureP coin_sig; + + /** + * Refresh commitment this coin is melted into. + */ + struct TALER_RefreshCommitmentP rc; + + /** + * How much value is being melted? This amount includes the fees, + * so the final amount contributed to the melt is this value minus + * the fee for melting the coin. We include the fee in what is + * being signed so that we can verify a reserve's remaining total + * balance without needing to access the respective denomination key + * information each time. + */ + struct TALER_Amount amount_with_fee; + + /** + * Index (smaller #TALER_CNC_KAPPA) which the exchange has chosen to not + * have revealed during cut and choose. + */ + uint32_t noreveal_index; + +}; + + +/** + * Information about a /purses/$PID/deposit operation. + */ +struct TALER_EXCHANGEDB_PurseDeposit +{ + + /** + * Exchange hosting the purse, NULL for this exchange. + */ + char *exchange_base_url; + + /** + * Public key of the purse. + */ + struct TALER_PurseContractPublicKeyP purse_pub; + + /** + * Contribution of the coin to the purse, including + * deposit fee. + */ + struct TALER_Amount amount; + + /** + * Depositing fee. + */ + struct TALER_Amount deposit_fee; + + /** + * Signature by the coin affirming the deposit. + */ + struct TALER_CoinSpendSignatureP coin_sig; + + /** + * Public key of the coin. + */ + struct TALER_CoinSpendPublicKeyP coin_pub; + + /** + * Hash of the age commitment used to sign the coin, if age restriction was + * applicable to the denomination. May be all zeroes if no age restriction + * applies. + */ + struct TALER_AgeCommitmentHashP h_age_commitment; + + /** + * Set to true if @e h_age_commitment is not available. + */ + bool no_age_commitment; + +}; + + +/** + * Information about a melt operation since vDOLDPLUS of the protocol. + * This also includes the information for the reveal phase. + */ +struct TALER_EXCHANGEDB_Refresh_vDOLDPLUS +{ + /** + * Information about the coin that is being melted. + */ + struct TALER_CoinPublicInfo coin; + + /** + * Signature over the melting operation. + */ + struct TALER_CoinSpendSignatureP coin_sig; + + /** + * Refresh commitment this coin is melted into. + */ + struct TALER_RefreshCommitmentP rc; + + /** + * True if the client has successfully performed the reveal part + * of the refresh protocol, after the melt. + */ + bool is_revealed; + + /** + * @since vDOLDPLUS + * Mark if we have a v27 Refresh object. + * That is, the @a refresh_seed refers to the vDOLDPLUS master_refresh_seed + * from the original request, AND the client has provided transfer public keys, + * see below, @a transfer_public_keys + */ + bool is_v27_refresh; + + /** + * Public seed from which the refresh nonces (v27) or transfer secrets (vDOLDPLUS) + * per coin candidate were derived from. + */ + struct TALER_PublicRefreshMasterSeedP refresh_seed; + + /** + * How much value is being melted? This amount includes the fees, + * so the final amount contributed to the melt is this value minus + * the fee for melting the coin. We include the fee in what is + * being signed so that we can verify a reserve's remaining total + * balance without needing to access the respective denomination key + * information each time. + */ + struct TALER_Amount amount_with_fee; + + /** + * Number of coins to be refreshed into + */ + size_t num_coins; + + /** + * The running hash over all kappa * @a num_coins blinded coin envelopes, provided by + * the client. + */ + struct TALER_HashBlindedPlanchetsP planchets_h; + + /** + * The running hash over all chosen (noreveal_index) @a num_coins blinded coin envelopes. + */ + struct TALER_HashBlindedPlanchetsP selected_h; + + /** + * Array of @a num_coins denomination signatures of the blinded coins. + */ + struct TALER_BlindedDenominationSignature *denom_sigs; + + /** + * If @a is_v27_refresh is false, the client performed a vDOLDPLUS refresh, + * and has provided @a num_coins * kappa transfer public keys. + * This is the chosen (at index @a noreveal_index) array of @a num_coins transfer public keys. + */ + struct TALER_TransferPublicKeyP *transfer_pubs; + + /** + * Array of @a num_coins serial id's of the denominations. + * If @e coin.no_age_commitment is false, the denominations + * MUST support age restriction. + */ + uint64_t *denom_serials; + + /** + * Index (smaller #TALER_CNC_KAPPA) which the exchange chose to not + * to be revealed during cut and choose. + */ + uint32_t noreveal_index; + + /** + * True, if the client has successfully performed the reveal step + */ + bool revealed; + + /** + * If true, no @e blinding_seed is set and @e num_cs_r_values is 0. + */ + bool no_blinding_seed; + + /** + * If @e no_blinding_seed is false, the blinding seed for the nonces needed for + * blind CS signatures. + */ + struct TALER_BlindingMasterSeedP blinding_seed; + + /** + * Number of elements in @e cs_r_values. + */ + size_t num_cs_r_values; + + /** + * Array @e num_cs_r_values of public R-values for CS that were generated from the + * @e blinding_seed, a coin's index and the denomination's private key during the + * the /melt request, to ensure idempotency in case of expiration of a denomination. + * NULL if @e num_cs_r_values is 0. + */ + struct GNUNET_CRYPTO_CSPublicRPairP *cs_r_values; + + /** + * If @e num_cs_r_values is not 0, the bitvector of choices for the pairs + * in @e cs_r_values that was made by the exchange. The vector is in NBO + * and the lowest bit represents the choice for the pair at index 0 into @e cs_r_values; + */ + uint64_t cs_r_choices; + + /** + * [out]-Array of @a num_coins hashes of the public keys of the denominations + * identified by @e denom_serials. This field is set when calling + * get_refresh + */ + struct TALER_DenominationHashP *denom_pub_hashes; +}; + + +/** + * Generic KYC status for some operation. + */ +struct TALER_EXCHANGEDB_KycStatus +{ + + /** + * Account public key that is currently associated + * with the account. Only set if @e have_account_pub + * is true. + */ + union TALER_AccountPublicKeyP account_pub; + + /** + * Number that identifies the KYC requirement the operation + * was about. + */ + uint64_t requirement_row; + + /** + * True if @e account_pub is set. + */ + bool have_account_pub; + + /** + * True if the KYC status is "satisfied". + */ + bool ok; + +}; + + +/** + * Function called with details about incoming wire transfers. + * + * @param cls closure + * @param rowid unique serial ID for the refresh session in our DB + * @param reserve_pub public key of the reserve (also the wire subject) + * @param credit amount that was received + * @param sender_account_details information about the sender's bank account, in payto://-format + * @param wire_reference unique identifier for the wire transfer + * @param execution_date when did we receive the funds + * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_ReserveInCallback)( + void *cls, + uint64_t rowid, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_Amount *credit, + const struct TALER_FullPayto sender_account_details, + uint64_t wire_reference, + struct GNUNET_TIME_Timestamp execution_date); + + +/** + * Function called with the results of the lookup of the + * wire transfer data of the exchange. + * + * @param cls closure + * @param rowid identifier of the respective row in the database + * @param date timestamp of the wire transfer (roughly) + * @param wtid wire transfer subject + * @param payto_uri details of the receiver, URI in payto://-format + * @param amount amount that was wired + * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_WireTransferOutCallback)( + void *cls, + uint64_t rowid, + struct GNUNET_TIME_Timestamp date, + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_FullPayto payto_uri, + const struct TALER_Amount *amount); + + +/** + * Function called with details about expired reserves. + * + * @param cls closure + * @param reserve_pub public key of the reserve + * @param left amount left in the reserve + * @param account_details information about the reserve's bank account, in payto://-format + * @param expiration_date when did the reserve expire + * @param close_request_row row that caused the reserve + * to be closed, 0 if it expired without request + * @return #GNUNET_OK on success, + * #GNUNET_NO to retry + * #GNUNET_SYSERR on hard failures (exit) + */ +typedef enum GNUNET_GenericReturnValue +(*TALER_EXCHANGEDB_ReserveExpiredCallback)( + void *cls, + const struct TALER_ReservePublicKeyP *reserve_pub, + const struct TALER_Amount *left, + const struct TALER_FullPayto account_details, + struct GNUNET_TIME_Timestamp expiration_date, + uint64_t close_request_row); + + +/** + * Callback that is given AML-relevant transfer data. + * + * @param cls closure + * @param row_id current row in AML status table + * @param payto_uri account involved with the wire transfer + * @param execution_time when was the transfer made + * @param amount wire amount of the transfer + */ +typedef void +(*TALER_EXCHANGEDB_AmlTransferCallback)( + void *cls, + uint64_t row_id, + const char *payto_uri, + struct GNUNET_TIME_Absolute execution_time, + const struct TALER_Amount *amount); + + +/** + * Initialize the database connection. + * + * @param cfg configuration to use + * @param skip_preflight true if we should skip the usual + * preflight check which assures us that the DB is actually + * operational; only taler-exchange-dbinit should use true here. + * @return NULL on failure + */ +struct TALER_EXCHANGEDB_PostgresContext * +TALER_EXCHANGEDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, + bool skip_preflight); + + +/** + * Shutdown the database connection. + * + * @param[in] pg connection to drop + */ +void +TALER_EXCHANGEDB_disconnect (struct TALER_EXCHANGEDB_PostgresContext *pg); + + +/** + * Meta data about a denomination public key. + * If this is changed, you must also adjust + * taler-exchange-httpd-post-management-keys.c::denomination_meta_cmp(). + */ +struct TALER_EXCHANGEDB_DenominationKeyMetaData +{ + /** + * Serial of the denomination key as in the DB. + * Can be used calls to stored procedures in order to spare + * additional lookups. + */ + uint64_t serial; + + /** + * Start time of the validity period for this key. + */ + struct GNUNET_TIME_Timestamp start; + + /** + * The exchange will sign fresh coins between @e start and this time. + * @e expire_withdraw will be somewhat larger than @e start to + * ensure a sufficiently large anonymity set, while also allowing + * the Exchange to limit the financial damage in case of a key being + * compromised. Thus, exchanges with low volume are expected to have a + * longer withdraw period (@e expire_withdraw - @e start) than exchanges + * with high transaction volume. The period may also differ between + * types of coins. A exchange may also have a few denomination keys + * with the same value with overlapping validity periods, to address + * issues such as clock skew. + */ + struct GNUNET_TIME_Timestamp expire_withdraw; + + /** + * Coins signed with the denomination key must be spent or refreshed + * between @e start and this expiration time. After this time, the + * exchange will refuse transactions involving this key as it will + * "drop" the table with double-spending information (shortly after) + * this time. Note that wallets should refresh coins significantly + * before this time to be on the safe side. @e expire_deposit must be + * significantly larger than @e expire_withdraw (by months or even + * years). + */ + struct GNUNET_TIME_Timestamp expire_deposit; + + /** + * When do signatures with this denomination key become invalid? + * After this point, these signatures cannot be used in (legal) + * disputes anymore, as the Exchange is then allowed to destroy its side + * of the evidence. @e expire_legal is expected to be significantly + * larger than @e expire_deposit (by a year or more). + */ + struct GNUNET_TIME_Timestamp expire_legal; + + /** + * The value of the coins signed with this denomination key. + */ + struct TALER_Amount value; + + /** + * The fees the exchange charges for operations with + * coins of this denomination. + */ + struct TALER_DenomFeeSet fees; + + /** + * Age restriction for the denomination. (can be zero). If not zero, the bits + * set in the mask mark the edges at the beginning of a next age group. F.e. + * for the age groups + * 0-7, 8-9, 10-11, 12-14, 14-15, 16-17, 18-21, 21-* + * the following bits are set: + * + * 31 24 16 8 0 + * | | | | | + * oooooooo oo1oo1o1 o1o1o1o1 ooooooo1 + * + * A value of 0 means that the denomination does not support the extension for + * age-restriction. + */ + struct TALER_AgeMask age_mask; +}; + + +/** + * Information about an account from the configuration. + */ +struct TALER_EXCHANGEDB_AccountInfo +{ + /** + * Authentication data. Only parsed if + * #TALER_EXCHANGEDB_ALO_AUTHDATA was set. + */ + const struct TALER_BANK_AuthenticationData *auth; + + /** + * Section in the configuration file that specifies the + * account. Must start with "exchange-account-". + */ + const char *section_name; + + /** + * Name of the wire method used by this account. + */ + const char *method; + + /** + * Full payto://-URI of the account. Do not free(), aliased + * with the underlying `struct WireAccount`. + */ + struct TALER_FullPayto payto_uri; + + /** + * true if this account is enabled to be debited + * by the taler-exchange-aggregator. + */ + bool debit_enabled; + + /** + * true if this account is enabled to be credited by wallets + * and needs to be watched by the taler-exchange-wirewatch. + * Also, the account will only be included in /wire if credit + * is enabled. + */ + bool credit_enabled; +}; + + +/** + * Function called with information about a wire account. + * + * @param cls closure + * @param ai account information + */ +typedef void +(*TALER_EXCHANGEDB_AccountCallback)( + void *cls, + const struct TALER_EXCHANGEDB_AccountInfo *ai); + + +/** + * Return information about all accounts that + * were loaded by #TALER_EXCHANGEDB_load_accounts(). + * + * @param cb callback to invoke + * @param cb_cls closure for @a cb + */ +void +TALER_EXCHANGEDB_find_accounts (TALER_EXCHANGEDB_AccountCallback cb, + void *cb_cls); + + +/** + * Find the wire plugin for the given payto:// URL. + * Only useful after the accounts have been loaded + * using #TALER_EXCHANGEDB_load_accounts(). + * + * @param method wire method we need an account for + * @return NULL on error + */ +const struct TALER_EXCHANGEDB_AccountInfo * +TALER_EXCHANGEDB_find_account_by_method (const char *method); + + +/** + * Find the wire plugin for the given payto:// URL + * Only useful after the accounts have been loaded + * using #TALER_EXCHANGEDB_load_accounts(). + * + * @param url wire address we need an account for + * @return NULL on error + */ +const struct TALER_EXCHANGEDB_AccountInfo * +TALER_EXCHANGEDB_find_account_by_payto_uri ( + const struct TALER_FullPayto url); + + +/** + * Options for #TALER_EXCHANGEDB_load_accounts() + */ +enum TALER_EXCHANGEDB_AccountLoaderOptions +{ + TALER_EXCHANGEDB_ALO_NONE = 0, + + /** + * Load accounts enabled for DEBITs. + */ + TALER_EXCHANGEDB_ALO_DEBIT = 1, + + /** + * Load accounts enabled for CREDITs. + */ + TALER_EXCHANGEDB_ALO_CREDIT = 2, + + /** + * Load authentication data from the + * "taler-accountcredentials-" section + * to access the account at the bank. + */ + TALER_EXCHANGEDB_ALO_AUTHDATA = 4 +}; + + +/** + * Load account information op the exchange from @a cfg. + * + * @param cfg configuration to load from + * @param options loader options + * @return #GNUNET_OK on success, #GNUNET_NO if no accounts are configured + */ +enum GNUNET_GenericReturnValue +TALER_EXCHANGEDB_load_accounts ( + const struct GNUNET_CONFIGURATION_Handle *cfg, + enum TALER_EXCHANGEDB_AccountLoaderOptions options); + + +/** + * Free resources allocated by + * #TALER_EXCHANGEDB_load_accounts(). + */ +void +TALER_EXCHANGEDB_unload_accounts (void); + + +#endif diff --git a/src/include/platform.h b/src/include/platform.h @@ -0,0 +1,299 @@ +/* + This file is part of TALER + Copyright (C) 2014 Chrisitan Grothoff (and other contributing authors) + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +*/ + +/** + * @file include/platform.h + * @brief This file contains the includes and definitions which are used by the + * rest of the modules + * @author Sree Harsha Totakura <sreeharsha@totakura.in> + */ +#ifndef PLATFORM_H_ +#define PLATFORM_H_ + +/* Include our configuration header */ +#ifndef HAVE_USED_CONFIG_H +#define HAVE_USED_CONFIG_H +#ifdef HAVE_CONFIG_H +#include "taler_config.h" +#endif +#endif + +/* For the exchange build, we do NOT want gettext, even + if it is available! */ +#undef ENABLE_NLS + + +#if (GNUNET_EXTRA_LOGGING >= 1) +#define VERBOSE(cmd) cmd +#else +#define VERBOSE(cmd) do { break; } while (0) +#endif + +/* Include the features available for GNU source */ +#define _GNU_SOURCE + +/* Do not use shortcuts for gcrypt mpi */ +#define GCRYPT_NO_MPI_MACROS 1 + +/* Do not use deprecated functions from gcrypt */ +#define GCRYPT_NO_DEPRECATED 1 + +/* Ignore MHD deprecations for now as we want to be compatible + to "ancient" MHD releases. */ +#define MHD_NO_DEPRECATION 1 + +/* Enable additional sanity checks that may result in a moderate + loss of performance but could be helpful to spot bugs. This + option should be enabled unless we are running benchmarks and/or + really need the last bit of performance. So even in production, + the default should be 'on' unless it was established that this + is needed for performance reasons. */ +#define ENABLE_SANITY_CHECKS 1 + + +#include <netdb.h> +#include <sys/socket.h> +#include <sys/un.h> +#if HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif +#if HAVE_NETINET_IN_SYSTM_H +#include <netinet/in_systm.h> +#endif +#if HAVE_NETINET_IP_H +#include <netinet/ip.h> /* superset of previous */ +#endif +#include <arpa/inet.h> +#include <netinet/tcp.h> +#include <pwd.h> +#include <sys/ioctl.h> +#include <sys/wait.h> +#include <grp.h> + +#include <string.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> +#include <stdarg.h> +#include <stdbool.h> +#include <errno.h> +#include <signal.h> +#include <libgen.h> +#ifdef HAVE_MALLOC_H +#include <malloc.h> /* for mallinfo on GNU */ +#endif +#include <unistd.h> /* KLB_FIX */ +#include <sys/stat.h> +#include <sys/types.h> +#include <dirent.h> /* KLB_FIX */ +#include <fcntl.h> +#include <math.h> +#if HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif +#if HAVE_SYS_TIME_H +#include <sys/time.h> +#endif +#include <time.h> +#ifdef BSD +#include <net/if.h> +#endif +#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) +#include <semaphore.h> +#endif +#ifdef DARWIN +#include <dlfcn.h> +#include <semaphore.h> +#include <net/if.h> +#endif +#if defined(__linux__) || defined(GNU) +#include <net/if.h> +#endif +#ifdef SOLARIS +#include <sys/sockio.h> +#include <sys/filio.h> +#include <sys/loadavg.h> +#include <semaphore.h> +#endif +#if HAVE_UCRED_H +#include <ucred.h> +#endif +#if HAVE_SYS_UCRED_H +#include <sys/ucred.h> +#endif +#if HAVE_IFADDRS_H +#include <ifaddrs.h> +#endif +#include <errno.h> +#include <limits.h> + +#if HAVE_VFORK_H +#include <vfork.h> +#endif + +#include <ctype.h> +#if HAVE_SYS_RESOURCE_H +#include <sys/resource.h> +#endif + +#if HAVE_ENDIAN_H +#include <endian.h> +#endif +#if HAVE_SYS_ENDIAN_H +#include <sys/endian.h> +#endif + +#define DIR_SEPARATOR '/' +#define DIR_SEPARATOR_STR "/" +#define PATH_SEPARATOR ':' +#define PATH_SEPARATOR_STR ":" +#define NEWLINE "\n" + + +#include <locale.h> +#include "gettext.h" +/** + * GNU gettext support macro. + */ +#define _(String) dgettext (PACKAGE, String) + + +#include <sys/mman.h> + +/* FreeBSD_kernel is not defined on the now discontinued kFreeBSD */ +#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) +#define __BYTE_ORDER BYTE_ORDER +#define __BIG_ENDIAN BIG_ENDIAN +#endif + +#ifdef DARWIN +#define __BYTE_ORDER BYTE_ORDER +#define __BIG_ENDIAN BIG_ENDIAN +/* not available on darwin, override configure */ +#undef HAVE_STAT64 +#undef HAVE_MREMAP +#endif + +#if ! HAVE_ATOLL +long long +atoll (const char *nptr); + +#endif + +#if ENABLE_NLS +#include "langinfo.h" +#endif + +#ifndef SIZE_MAX +#define SIZE_MAX ((size_t) (-1)) +#endif + +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif + + +#if defined(__sparc__) +#define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \ + sizeof((val))); \ + __tmp; }) +#else +#define MAKE_UNALIGNED(val) val +#endif + + +#ifndef PATH_MAX +/** + * Assumed maximum path length. + */ +#define PATH_MAX 4096 +#endif + +#if HAVE_THREAD_LOCAL_GCC +#define TALER_THREAD_LOCAL __thread +#else +#define TALER_THREAD_LOCAL +#endif + + +/* LSB-style exit status codes */ +#ifndef EXIT_INVALIDARGUMENT +/** + * Command-line arguments are invalid. + * Restarting useless. + */ +#define EXIT_INVALIDARGUMENT 2 +#endif + +#ifndef EXIT_NOTIMPLEMENTED +/** + * The requested operation is not implemented. + * Restarting useless. + */ +#define EXIT_NOTIMPLEMENTED 3 +#endif + +#ifndef EXIT_NOPERMISSION +/** + * Permissions needed to run are not available. + * Restarting useless. + */ +#define EXIT_NOPERMISSION 4 +#endif + +#ifndef EXIT_NOTINSTALLED +/** + * Key resources are not installed. + * Restarting useless. + */ +#define EXIT_NOTINSTALLED 5 +#endif + +#ifndef EXIT_NOTCONFIGURED +/** + * Key configuration settings are missing or invalid. + * Restarting useless. + */ +#define EXIT_NOTCONFIGURED 6 +#endif + +#ifndef EXIT_NOTRUNNING +#define EXIT_NOTRUNNING 7 +#endif + + +#ifndef EXIT_NO_RESTART +/** + * Exit code from 'main' if we do not want to be restarted, + * except by manual intervention (hard failure). + */ +#define EXIT_NO_RESTART 9 +#endif + + +/** + * clang et al do not have such an attribute + */ +#if __has_attribute (__nonstring__) +# define __nonstring __attribute__((__nonstring__)) +#else +# define __nonstring +#endif + + +#endif /* PLATFORM_H_ */ + +/* end of platform.h */ diff --git a/src/include/taler/meson.build b/src/include/taler/meson.build @@ -4,14 +4,12 @@ talerinclude_headers = [ 'taler_auditor_service.h', 'taler_amount_lib.h', 'taler_attributes.h', - 'taler_auditordb_lib.h', 'taler_bank_service.h', 'taler_crypto_lib.h', 'taler_curl_lib.h', 'taler_dbevents.h', 'taler_error_codes.h', 'taler_exchange_service.h', - 'taler_exchangedb_lib.h', 'taler_extensions.h', 'taler_extensions_policy.h', 'taler_fakebank_lib.h', @@ -40,9 +38,3 @@ if mhd2_dep.found() install_dir: get_option('includedir') / 'taler', ) endif - -configure_file(input: 'platform.h', output: 'platform.h', copy: true) - -configure_file(input: 'backoff.h', output: 'backoff.h', copy: true) - - diff --git a/src/include/taler/platform.h b/src/include/taler/platform.h @@ -1,299 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014 Chrisitan Grothoff (and other contributing authors) - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -*/ - -/** - * @file include/taler/platform.h - * @brief This file contains the includes and definitions which are used by the - * rest of the modules - * @author Sree Harsha Totakura <sreeharsha@totakura.in> - */ -#ifndef PLATFORM_H_ -#define PLATFORM_H_ - -/* Include our configuration header */ -#ifndef HAVE_USED_CONFIG_H -#define HAVE_USED_CONFIG_H -#ifdef HAVE_CONFIG_H -#include "taler_config.h" -#endif -#endif - -/* For the exchange build, we do NOT want gettext, even - if it is available! */ -#undef ENABLE_NLS - - -#if (GNUNET_EXTRA_LOGGING >= 1) -#define VERBOSE(cmd) cmd -#else -#define VERBOSE(cmd) do { break; } while (0) -#endif - -/* Include the features available for GNU source */ -#define _GNU_SOURCE - -/* Do not use shortcuts for gcrypt mpi */ -#define GCRYPT_NO_MPI_MACROS 1 - -/* Do not use deprecated functions from gcrypt */ -#define GCRYPT_NO_DEPRECATED 1 - -/* Ignore MHD deprecations for now as we want to be compatible - to "ancient" MHD releases. */ -#define MHD_NO_DEPRECATION 1 - -/* Enable additional sanity checks that may result in a moderate - loss of performance but could be helpful to spot bugs. This - option should be enabled unless we are running benchmarks and/or - really need the last bit of performance. So even in production, - the default should be 'on' unless it was established that this - is needed for performance reasons. */ -#define ENABLE_SANITY_CHECKS 1 - - -#include <netdb.h> -#include <sys/socket.h> -#include <sys/un.h> -#if HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#if HAVE_NETINET_IN_SYSTM_H -#include <netinet/in_systm.h> -#endif -#if HAVE_NETINET_IP_H -#include <netinet/ip.h> /* superset of previous */ -#endif -#include <arpa/inet.h> -#include <netinet/tcp.h> -#include <pwd.h> -#include <sys/ioctl.h> -#include <sys/wait.h> -#include <grp.h> - -#include <string.h> -#include <stdio.h> -#include <stdlib.h> -#include <stdint.h> -#include <stdarg.h> -#include <stdbool.h> -#include <errno.h> -#include <signal.h> -#include <libgen.h> -#ifdef HAVE_MALLOC_H -#include <malloc.h> /* for mallinfo on GNU */ -#endif -#include <unistd.h> /* KLB_FIX */ -#include <sys/stat.h> -#include <sys/types.h> -#include <dirent.h> /* KLB_FIX */ -#include <fcntl.h> -#include <math.h> -#if HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#if HAVE_SYS_TIME_H -#include <sys/time.h> -#endif -#include <time.h> -#ifdef BSD -#include <net/if.h> -#endif -#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) -#include <semaphore.h> -#endif -#ifdef DARWIN -#include <dlfcn.h> -#include <semaphore.h> -#include <net/if.h> -#endif -#if defined(__linux__) || defined(GNU) -#include <net/if.h> -#endif -#ifdef SOLARIS -#include <sys/sockio.h> -#include <sys/filio.h> -#include <sys/loadavg.h> -#include <semaphore.h> -#endif -#if HAVE_UCRED_H -#include <ucred.h> -#endif -#if HAVE_SYS_UCRED_H -#include <sys/ucred.h> -#endif -#if HAVE_IFADDRS_H -#include <ifaddrs.h> -#endif -#include <errno.h> -#include <limits.h> - -#if HAVE_VFORK_H -#include <vfork.h> -#endif - -#include <ctype.h> -#if HAVE_SYS_RESOURCE_H -#include <sys/resource.h> -#endif - -#if HAVE_ENDIAN_H -#include <endian.h> -#endif -#if HAVE_SYS_ENDIAN_H -#include <sys/endian.h> -#endif - -#define DIR_SEPARATOR '/' -#define DIR_SEPARATOR_STR "/" -#define PATH_SEPARATOR ':' -#define PATH_SEPARATOR_STR ":" -#define NEWLINE "\n" - - -#include <locale.h> -#include "gettext.h" -/** - * GNU gettext support macro. - */ -#define _(String) dgettext (PACKAGE, String) - - -#include <sys/mman.h> - -/* FreeBSD_kernel is not defined on the now discontinued kFreeBSD */ -#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__) -#define __BYTE_ORDER BYTE_ORDER -#define __BIG_ENDIAN BIG_ENDIAN -#endif - -#ifdef DARWIN -#define __BYTE_ORDER BYTE_ORDER -#define __BIG_ENDIAN BIG_ENDIAN -/* not available on darwin, override configure */ -#undef HAVE_STAT64 -#undef HAVE_MREMAP -#endif - -#if ! HAVE_ATOLL -long long -atoll (const char *nptr); - -#endif - -#if ENABLE_NLS -#include "langinfo.h" -#endif - -#ifndef SIZE_MAX -#define SIZE_MAX ((size_t) (-1)) -#endif - -#ifndef O_LARGEFILE -#define O_LARGEFILE 0 -#endif - - -#if defined(__sparc__) -#define MAKE_UNALIGNED(val) ({ __typeof__((val)) __tmp; memmove (&__tmp, &(val), \ - sizeof((val))); \ - __tmp; }) -#else -#define MAKE_UNALIGNED(val) val -#endif - - -#ifndef PATH_MAX -/** - * Assumed maximum path length. - */ -#define PATH_MAX 4096 -#endif - -#if HAVE_THREAD_LOCAL_GCC -#define TALER_THREAD_LOCAL __thread -#else -#define TALER_THREAD_LOCAL -#endif - - -/* LSB-style exit status codes */ -#ifndef EXIT_INVALIDARGUMENT -/** - * Command-line arguments are invalid. - * Restarting useless. - */ -#define EXIT_INVALIDARGUMENT 2 -#endif - -#ifndef EXIT_NOTIMPLEMENTED -/** - * The requested operation is not implemented. - * Restarting useless. - */ -#define EXIT_NOTIMPLEMENTED 3 -#endif - -#ifndef EXIT_NOPERMISSION -/** - * Permissions needed to run are not available. - * Restarting useless. - */ -#define EXIT_NOPERMISSION 4 -#endif - -#ifndef EXIT_NOTINSTALLED -/** - * Key resources are not installed. - * Restarting useless. - */ -#define EXIT_NOTINSTALLED 5 -#endif - -#ifndef EXIT_NOTCONFIGURED -/** - * Key configuration settings are missing or invalid. - * Restarting useless. - */ -#define EXIT_NOTCONFIGURED 6 -#endif - -#ifndef EXIT_NOTRUNNING -#define EXIT_NOTRUNNING 7 -#endif - - -#ifndef EXIT_NO_RESTART -/** - * Exit code from 'main' if we do not want to be restarted, - * except by manual intervention (hard failure). - */ -#define EXIT_NO_RESTART 9 -#endif - - -/** - * clang et al do not have such an attribute - */ -#if __has_attribute (__nonstring__) -# define __nonstring __attribute__((__nonstring__)) -#else -# define __nonstring -#endif - - -#endif /* PLATFORM_H_ */ - -/* end of platform.h */ diff --git a/src/include/taler/taler_auditordb_lib.h b/src/include/taler/taler_auditordb_lib.h @@ -1,628 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2016 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -*/ -/** - * @file include/taler/taler_auditordb_lib.h - * @brief high-level interface for the auditor's database - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#ifndef TALER_AUDITORDB_LIB_H -#define TALER_AUDITORDB_LIB_H - -#include <jansson.h> -#include <gnunet/gnunet_util_lib.h> -#include <gnunet/gnunet_db_lib.h> -#include <taler/taler_util.h> -#include <taler/taler_auditordb_lib.h> - -/** - * Connection to the postgres database of the auditor. - */ -struct TALER_AUDITORDB_PostgresContext; - - -/** - * Information about a deposit confirmation we received from - * a merchant. - */ -struct TALER_AUDITORDB_DepositConfirmation -{ - - /** - * Hash over the contract for which this deposit is made. - */ - struct TALER_PrivateContractHashP h_contract_terms; - - /** - * Hash over the policy extension for the deposit. - */ - struct TALER_ExtensionPolicyHashP h_policy; - - /** - * Hash over the wiring information of the merchant. - */ - struct TALER_MerchantWireHashP h_wire; - - /** - * Time when this deposit confirmation was generated by the exchange. - */ - struct GNUNET_TIME_Timestamp exchange_timestamp; - - /** - * How much time does the @e merchant have to issue a refund - * request? Zero if refunds are not allowed. After this time, the - * coin cannot be refunded. Note that the wire transfer will not be - * performed by the exchange until the refund deadline. This value - * is taken from the original deposit request. - */ - struct GNUNET_TIME_Timestamp refund_deadline; - - /** - * How much time does the @e exchange have to wire the funds? - */ - struct GNUNET_TIME_Timestamp wire_deadline; - - /** - * Amount to be deposited, excluding fee. Calculated from the - * amount with fee and the fee from the deposit request. - */ - struct TALER_Amount total_without_fee; - - /** - * Array of the coin public keys involved in the - * batch deposit operation. - */ - const struct TALER_CoinSpendPublicKeyP *coin_pubs; - - /** - * Array of coin deposit signatures from the deposit operation. - */ - const struct TALER_CoinSpendSignatureP *coin_sigs; - - /** - * The Merchant's public key. Allows the merchant to later refund - * the transaction or to inquire about the wire transfer identifier. - */ - struct TALER_MerchantPublicKeyP merchant; - - /** - * Signature from the exchange of type - * #TALER_SIGNATURE_EXCHANGE_CONFIRM_DEPOSIT. - */ - struct TALER_ExchangeSignatureP exchange_sig; - - /** - * Public signing key from the exchange matching @e exchange_sig. - */ - struct TALER_ExchangePublicKeyP exchange_pub; - - /** - * Exchange master signature over @e exchange_sig. - */ - struct TALER_MasterSignatureP master_sig; - - /** - * Row of this entry in the auditor database. - */ - uint64_t row_id; - - /** - * Length of the @e coin_pubs and @e coin_sigs arrays. - */ - unsigned int num_coins; - - bool suppressed; - -}; - - -/** - * Information about a row inconsistency - */ -struct TALER_AUDITORDB_Generic_Update -{ - uint64_t row_id; - bool suppressed; - bool ancient; -}; - - -/** - * Information about a coin inconsistency - */ -struct TALER_AUDITORDB_CoinInconsistency -{ - uint64_t row_id; - char *operation; - struct TALER_Amount exchange_amount; - struct TALER_Amount auditor_amount; - struct GNUNET_CRYPTO_EddsaPublicKey coin_pub; - bool profitable; -}; - -/** - * Information about a row inconsistency - */ -struct TALER_AUDITORDB_RowInconsistency -{ - uint64_t row_id; - char *row_table; - char *diagnostic; - bool suppressed; -}; - -/** - * Information about a bad sig loss - */ -struct TALER_AUDITORDB_BadSigLosses -{ - uint64_t row_id; - uint64_t problem_row_id; - char *operation; - struct TALER_Amount loss; - struct GNUNET_CRYPTO_EddsaPublicKey operation_specific_pub; - bool suppressed; -}; - -/** - * Information about a closure lags - */ -struct TALER_AUDITORDB_ClosureLags -{ - uint64_t row_id; - uint64_t problem_row_id; - struct TALER_Amount amount; - struct GNUNET_TIME_Absolute deadline; - struct TALER_WireTransferIdentifierRawP wtid; - struct TALER_FullPayto account; - bool suppressed; -}; - -/** - * Information about a emergency - */ -struct TALER_AUDITORDB_Emergency -{ - uint64_t row_id; - struct TALER_DenominationHashP denompub_h; - struct TALER_Amount denom_risk; - struct TALER_Amount denom_loss; - struct GNUNET_TIME_Absolute deposit_start; - struct GNUNET_TIME_Absolute deposit_end; - struct TALER_Amount value; - bool suppressed; -}; - -/** - * Information about an emergency by count - */ -struct TALER_AUDITORDB_EmergenciesByCount -{ - uint64_t row_id; - struct TALER_DenominationHashP denompub_h; - uint64_t num_issued; - uint64_t num_known; - struct TALER_Amount risk; - struct GNUNET_TIME_Absolute start; - struct GNUNET_TIME_Absolute deposit_end; - struct TALER_Amount value; - bool suppressed; -}; - -/** - * Information about a fee time inconsistency - */ -struct TALER_AUDITORDB_FeeTimeInconsistency -{ - uint64_t row_id; - uint64_t problem_row_id; - char *type; - struct GNUNET_TIME_Absolute time; - char *diagnostic; -}; - -/** - * Information about a denom key validity withdraw inconsistency - */ -struct TALER_AUDITORDB_DenominationKeyValidityWithdrawInconsistency -{ - uint64_t row_id; - uint64_t problem_row_id; - struct GNUNET_TIME_Absolute execution_date; - struct TALER_ReservePublicKeyP reserve_pub; - struct TALER_DenominationHashP denompub_h; - bool suppressed; -}; - -/** - * Information about a purse not closed inconsistencies - */ -struct TALER_AUDITORDB_PurseNotClosedInconsistencies -{ - uint64_t row_id; - struct GNUNET_CRYPTO_EddsaPublicKey purse_pub; - struct TALER_Amount amount; - struct GNUNET_TIME_Absolute expiration_date; - bool suppressed; -}; - -/** - * Information about a reserve balance insufficient inconsistency - */ -struct TALER_AUDITORDB_ReserveBalanceInsufficientInconsistency -{ - uint64_t row_id; - struct GNUNET_CRYPTO_EddsaPublicKey reserve_pub; - bool inconsistency_gain; - struct TALER_Amount inconsistency_amount; - bool suppressed; -}; - -/** - * Information about a reserve in inconsistency - */ -struct TALER_AUDITORDB_ReserveInInconsistency -{ - uint64_t serial_id; - uint64_t bank_row_id; - struct TALER_Amount amount_exchange_expected; - struct TALER_Amount amount_wired; - struct TALER_ReservePublicKeyP reserve_pub; - struct GNUNET_TIME_Absolute timestamp; - struct TALER_FullPayto account; - char *diagnostic; - bool suppressed; - -}; - -/** - * Balance values for a reserve (or all reserves). - */ -struct TALER_AUDITORDB_ReserveFeeBalance -{ - /** - * Remaining funds. - */ - struct TALER_Amount reserve_balance; - - /** - * Losses from operations that should not have - * happened (e.g. negative balance). - */ - struct TALER_Amount reserve_loss; - - /** - * Fees charged for withdraw. - */ - struct TALER_Amount withdraw_fee_balance; - - /** - * Fees charged for closing. - */ - struct TALER_Amount close_fee_balance; - - /** - * Fees charged for purse creation. - */ - struct TALER_Amount purse_fee_balance; - - /** - * Opening fees charged. - */ - struct TALER_Amount open_fee_balance; - - /** - * History fees charged. - */ - struct TALER_Amount history_fee_balance; -}; - - -/** - * Balance data for denominations in circulation. - */ -struct TALER_AUDITORDB_DenominationCirculationData -{ - /** - * Amount of outstanding coins in circulation. - */ - struct TALER_Amount denom_balance; - - /** - * Amount lost due coins illicitly accepted (effectively, a - * negative @a denom_balance). - */ - struct TALER_Amount denom_loss; - - /** - * Total amount that could still be theoretically lost in the future due to - * recoup operations. (Total put into circulation minus @e recoup_loss). - */ - struct TALER_Amount denom_risk; - - /** - * Amount lost due to recoups. - */ - struct TALER_Amount recoup_loss; - - /** - * Number of coins of this denomination that the exchange signed into - * existence. - */ - uint64_t num_issued; -}; - -struct TALER_AUDITORDB_DenominationsWithoutSigs -{ - uint64_t row_id; - struct TALER_DenominationHashP denompub_h; - struct TALER_Amount value; - struct GNUNET_TIME_Absolute start_time; - struct GNUNET_TIME_Absolute end_time; - bool suppressed; -}; - -struct TALER_AUDITORDB_MisattributionInInconsistency -{ - uint64_t row_id; - struct TALER_Amount amount; - uint64_t bank_row; - struct TALER_ReservePublicKeyP reserve_pub; - bool suppressed; - -}; - -struct TALER_AUDITORDB_DenominationPending -{ - uint64_t row_id; - struct TALER_DenominationHashP denom_pub_hash; - struct TALER_Amount denom_balance; - struct TALER_Amount denom_loss; - uint64_t num_issued; - struct TALER_Amount denom_risk; - struct TALER_Amount recoup_loss; - bool suppressed; - -}; - -struct TALER_AUDITORDB_HistoricReserveSummary -{ - uint64_t row_id; - struct GNUNET_TIME_Absolute start_date; - struct GNUNET_TIME_Absolute end_date; - struct TALER_Amount reserve_profits; - bool suppressed; - -}; - -struct TALER_AUDITORDB_WireFormatInconsistency -{ - uint64_t row_id; - struct TALER_Amount amount; - uint64_t wire_offset; - char *diagnostic; - bool suppressed; - -}; - -struct TALER_AUDITORDB_WireOutInconsistency -{ - uint64_t row_id; - struct TALER_FullPayto destination_account; - char *diagnostic; - uint64_t wire_out_row_id; - struct TALER_Amount expected; - struct TALER_Amount claimed; - bool suppressed; - -}; - -struct TALER_AUDITORDB_RowMinorInconsistencies -{ - uint64_t row_id; - char *row_table; - uint64_t problem_row; - char *diagnostic; - bool suppressed; -}; - - -struct TALER_AUDITORDB_ReserveBalanceSummaryWrongInconsistency -{ - uint64_t row_id; - struct TALER_ReservePublicKeyP reserve_pub; - struct TALER_Amount exchange_amount; - struct TALER_Amount auditor_amount; - bool suppressed; - -}; - -struct TALER_AUDITORDB_ReserveNotClosedInconsistency -{ - uint64_t row_id; - struct TALER_ReservePublicKeyP reserve_pub; - struct TALER_Amount balance; - struct GNUNET_TIME_Absolute expiration_time; - char *diagnostic; - bool suppressed; - -}; - - -enum TALER_AUDITORDB_DeletableSuppressableTables -{ - /** - * For auditor_amount_arithmetic_inconsistency table. - */ - TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY, - - /** - * For auditor_closure_lags table. - */ - TALER_AUDITORDB_CLOSURE_LAGS, - - /** - * For auditor_progress table. - */ - TALER_AUDITORDB_PROGRESS, - - /** - * For auditor_bad_sig_losses table. - */ - TALER_AUDITORDB_BAD_SIG_LOSSES, - - /** - * For auditor_coin_inconsistency table. - */ - TALER_AUDITORDB_COIN_INCONSISTENCY, - - /** - * For auditor_denomination_key_validity_withdraw_inconsistency table. - */ - TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY, - - /** - * For auditor_denomination_pending table. - */ - TALER_AUDITORDB_DENOMINATION_PENDING, - - /** - * For auditor_denominations_without_sig table. - */ - TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG, - - /** - * For auditor_deposit_confirmation table. - */ - TALER_AUDITORDB_DEPOSIT_CONFIRMATION, - - /** - * For auditor_emergency table. - */ - TALER_AUDITORDB_EMERGENCY, - - /** - * For auditor_emergency_by_count table. - */ - TALER_AUDITORDB_EMERGENCY_BY_COUNT, - - /** - * For auditor_fee_time_inconsistency table. - */ - TALER_AUDITORDB_FEE_TIME_INCONSISTENCY, - - /** - * For auditor_misattribution_in_inconsistency table. - */ - TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY, - - /** - * For auditor_purse_not_closed_inconsistency table. - */ - TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY, - - /** - * For auditor_refreshes_hanging table. - */ - TALER_AUDITORDB_REFRESHES_HANGING, - - /** - * For auditor_reserve_balance_insufficient_inconsistency table. - */ - TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY, - - /** - * For auditor_reserve_balance_summary_wrong_inconsistency table. - */ - TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY, - - /** - * For auditor_reserve_in_inconsistency table. - */ - TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY, - - /** - * For auditor_reserve_not_closed_inconsistency table. - */ - TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY, - - /** - * For auditor_row_inconsistency table. - */ - TALER_AUDITORDB_ROW_INCONSISTENCY, - - /** - * For auditor_row_minor_inconsistency table. - */ - TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY, - - /** - * For auditor_wire_format_inconsistency table. - */ - TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY, - - /** - * For auditor_wire_out_inconsistency table. - */ - TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY, - - /** - * Terminal. - */ - TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX -}; - - -/** - * Information about an arithmetic inconsistency - */ -struct TALER_AUDITORDB_AmountArithmeticInconsistency -{ - uint64_t row_id; - uint64_t problem_row_id; - char *operation; - struct TALER_Amount exchange_amount; - struct TALER_Amount auditor_amount; - bool profitable; - bool suppressed; -}; - - -/** - * Initialize database connection. - * - * @param cfg configuration to use - * @param skip_preflight true if we should skip the usual - * preflight check which assures us that the DB is actually - * operational; only taler-auditor-dbinit should use true here. - * @return NULL on failure - */ -struct TALER_AUDITORDB_PostgresContext * -TALER_AUDITORDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, - bool skip_preflight); - - -/** - * Shutdown the database connection. - * - * @param[in] pg connection to disconnect - */ -void -TALER_AUDITORDB_disconnect (struct TALER_AUDITORDB_PostgresContext *pg); - - -#endif diff --git a/src/include/taler/taler_exchangedb_lib.h b/src/include/taler/taler_exchangedb_lib.h @@ -1,1133 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014-2020 Taler Systems SA - - TALER is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> -*/ -/** - * @file include/taler/taler_exchangedb_lib.h - * @brief IO operations for the exchange's private keys - * @author Florian Dold - * @author Benedikt Mueller - * @author Christian Grothoff - */ -#ifndef TALER_EXCHANGEDB_LIB_H -#define TALER_EXCHANGEDB_LIB_H - -#include <taler/taler_signatures.h> -#include <taler/taler_bank_service.h> -#include <taler/taler_kyclogic_lib.h> -#include <taler/taler_util.h> - - -/** - * Detailed status for persisting an AML program result. - */ -enum TALER_EXCHANGEDB_PersistProgramResultStatus -{ - TALER_EXCHANGEDB_PPRS_OK = 0, - TALER_EXCHANGEDB_PPRS_BAD_OUTCOME = 1, -}; - - -/** - * Information about a denomination key. - */ -struct TALER_EXCHANGEDB_DenominationKeyInformation -{ - - /** - * Signature over this struct to affirm the validity of the key. - */ - struct TALER_MasterSignatureP signature; - - /** - * Start time of the validity period for this key. - */ - struct GNUNET_TIME_Timestamp start; - - /** - * The exchange will sign fresh coins between @e start and this time. - * @e expire_withdraw will be somewhat larger than @e start to - * ensure a sufficiently large anonymity set, while also allowing - * the Exchange to limit the financial damage in case of a key being - * compromised. Thus, exchanges with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than exchanges - * with high transaction volume. The period may also differ between - * types of coins. A exchange may also have a few denomination keys - * with the same value with overlapping validity periods, to address - * issues such as clock skew. - */ - struct GNUNET_TIME_Timestamp expire_withdraw; - - /** - * Coins signed with the denomination key must be spent or refreshed - * between @e start and this expiration time. After this time, the - * exchange will refuse transactions involving this key as it will - * "drop" the table with double-spending information (shortly after) - * this time. Note that wallets should refresh coins significantly - * before this time to be on the safe side. @e expire_deposit must be - * significantly larger than @e expire_withdraw (by months or even - * years). - */ - struct GNUNET_TIME_Timestamp expire_deposit; - - /** - * When do signatures with this denomination key become invalid? - * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Exchange is then allowed to destroy its side - * of the evidence. @e expire_legal is expected to be significantly - * larger than @e expire_deposit (by a year or more). - */ - struct GNUNET_TIME_Timestamp expire_legal; - - /** - * The value of the coins signed with this denomination key. - */ - struct TALER_Amount value; - - /** - * Fees for the coin. - */ - struct TALER_DenomFeeSet fees; - - /** - * Hash code of the denomination public key. (Used to avoid having - * the variable-size RSA key in this struct.) - */ - struct TALER_DenominationHashP denom_hash; - - /** - * If denomination was setup for age restriction, non-zero age mask. - * Note that the mask is not part of the signature. - */ - struct TALER_AgeMask age_mask; -}; - - -GNUNET_NETWORK_STRUCT_BEGIN - -/** - * Events signalling that a coin deposit status - * changed. - */ -struct TALER_EXCHANGEDB_CoinDepositEventP -{ - /** - * Of type #TALER_DBEVENT_EXCHANGE_DEPOSIT_STATUS_CHANGED. - */ - struct GNUNET_DB_EventHeaderP header; - - /** - * Public key of the merchant. - */ - struct TALER_MerchantPublicKeyP merchant_pub; - -}; - -/** - * Events signalling a reserve got funding. - */ -struct TALER_EXCHANGEDB_ReserveEventP -{ - /** - * Of type #TALER_DBEVENT_EXCHANGE_RESERVE_INCOMING. - */ - struct GNUNET_DB_EventHeaderP header; - - /** - * Public key of the reserve the event is about. - */ - struct TALER_ReservePublicKeyP reserve_pub; -}; - - -/** - * Signature of events signalling a purse changed its status. - */ -struct TALER_EXCHANGEDB_PurseEventP -{ - /** - * Of type #TALER_DBEVENT_EXCHANGE_PURSE_MERGED or - * #TALER_DBEVENT_EXCHANGE_PURSE_DEPOSITED. - */ - struct GNUNET_DB_EventHeaderP header; - - /** - * Public key of the purse the event is about. - */ - struct TALER_PurseContractPublicKeyP purse_pub; -}; - - -/** - * Signature of events signalling a KYC process was completed. - */ -struct TALER_EXCHANGEDB_KycCompletedEventP -{ - /** - * Of type #TALER_DBEVENT_EXCHANGE_KYC_COMPLETED. - */ - struct GNUNET_DB_EventHeaderP header; - - /** - * Hash of payto://-URI for which the KYC state changed. - */ - struct TALER_NormalizedPaytoHashP h_payto; -}; - - -GNUNET_NETWORK_STRUCT_END - -/** - * Meta data about an exchange online signing key. - */ -struct TALER_EXCHANGEDB_SignkeyMetaData -{ - /** - * Start time of the validity period for this key. - */ - struct GNUNET_TIME_Timestamp start; - - /** - * The exchange will sign messages with this key between @e start and this time. - */ - struct GNUNET_TIME_Timestamp expire_sign; - - /** - * When do signatures with this sign key become invalid? - * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Exchange is then allowed to destroy its side - * of the evidence. @e expire_legal is expected to be significantly - * larger than @e expire_sign (by a year or more). - */ - struct GNUNET_TIME_Timestamp expire_legal; - -}; - - -/** - * @brief All information about a denomination key (which is used to - * sign coins into existence). - */ -struct TALER_EXCHANGEDB_DenominationKey -{ - /** - * The private key of the denomination. Will be NULL if the private - * key is not available (this is the case after the key has expired - * for signing coins, but is still valid for depositing coins). - */ - struct TALER_DenominationPrivateKey denom_priv; - - /** - * Decoded denomination public key (the hash of it is in - * @e issue, but we sometimes need the full public key as well). - */ - struct TALER_DenominationPublicKey denom_pub; - - /** - * Signed public information about a denomination key. - */ - struct TALER_EXCHANGEDB_DenominationKeyInformation issue; -}; - - -/** - * @brief A summary of a Reserve - */ -struct TALER_EXCHANGEDB_Reserve -{ - /** - * The reserve's public key. This uniquely identifies the reserve - */ - struct TALER_ReservePublicKeyP pub; - - /** - * The balance amount existing in the reserve - */ - struct TALER_Amount balance; - - /** - * The expiration date of this reserve; funds will be wired back - * at this time. - */ - struct GNUNET_TIME_Timestamp expiry; - - /** - * The legal expiration date of this reserve; we will forget about - * it at this time. - */ - struct GNUNET_TIME_Timestamp gc; -}; - - -/** - * Public key to which a nonce is locked. - */ -union TALER_EXCHANGEDB_NonceLockTargetP -{ - /** - * Nonce is locked to this coin key. - */ - struct TALER_CoinSpendPublicKeyP coin; - - /** - * Nonce is locked to this reserve key. - */ - struct TALER_ReservePublicKeyP reserve; -}; - - -/** - * @brief Data about a coin for a deposit operation. - */ -struct TALER_EXCHANGEDB_CoinDepositInformation -{ - /** - * Information about the coin that is being deposited. - */ - struct TALER_CoinPublicInfo coin; - - /** - * ECDSA signature affirming that the customer intends - * this coin to be deposited at the merchant identified - * by @e h_wire in relation to the proposal data identified - * by @e h_contract_terms. - */ - struct TALER_CoinSpendSignatureP csig; - - /** - * Fraction of the coin's remaining value to be deposited, including - * depositing fee (if any). The coin is identified by @e coin_pub. - */ - struct TALER_Amount amount_with_fee; - -}; - - -/** - * @brief Data from a batch deposit operation. - */ -struct TALER_EXCHANGEDB_BatchDeposit -{ - - /** - * Public key of the merchant. Enables later identification - * of the merchant in case of a need to rollback transactions. - */ - struct TALER_MerchantPublicKeyP merchant_pub; - - /** - * Signature of the merchant over the contract, of purpose - * #TALER_SIGNATURE_MERCHANT_CONTRACT. - */ - struct TALER_MerchantSignatureP merchant_sig; - - /** - * Hash over the proposal data between merchant and customer - * (remains unknown to the Exchange). - */ - struct TALER_PrivateContractHashP h_contract_terms; - - /** - * Hash over additional inputs by the wallet. - */ - struct GNUNET_HashCode wallet_data_hash; - - /** - * Unsalted hash over @e receiver_wire_account. - */ - struct TALER_FullPaytoHashP wire_target_h_payto; - - /** - * Salt used by the merchant to compute "h_wire". - */ - struct TALER_WireSaltP wire_salt; - - /** - * Time when this request was generated. Used, for example, to - * assess when (roughly) the income was achieved for tax purposes. - * Note that the Exchange will only check that the timestamp is not "too - * far" into the future (i.e. several days). The fact that the - * timestamp falls within the validity period of the coin's - * denomination key is irrelevant for the validity of the deposit - * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Exchange must accept very old deposit - * requests, as the merchant might have been unable to transmit the - * deposit request in a timely fashion (so back-dating is not - * prevented). - */ - struct GNUNET_TIME_Timestamp wallet_timestamp; - - /** - * How much time does the merchant have to issue a refund request? - * Zero if refunds are not allowed. After this time, the coin - * cannot be refunded. - */ - struct GNUNET_TIME_Timestamp refund_deadline; - - /** - * How much time does the merchant have to execute the wire transfer? - * This time is advisory for aggregating transactions, not a hard - * constraint (as the merchant can theoretically pick any time, - * including one in the past). - */ - struct GNUNET_TIME_Timestamp wire_deadline; - - /** - * Row ID of the policy details; 0 if no policy applies. - */ - uint64_t policy_details_serial_id; - - /** - * Information about the receiver for executing the transaction. URI in - * payto://-format. - */ - struct TALER_FullPayto receiver_wire_account; - - /** - * Optional extra information to include in the wire transfer - * subject. - */ - const char *extra_wire_subject_metadata; - - /** - * Array about the coins that are being deposited. - */ - const struct TALER_EXCHANGEDB_CoinDepositInformation *cdis; - - /** - * Length of the @e cdis array. - */ - unsigned int num_cdis; - - /** - * False if @e wallet_data_hash was provided - */ - bool no_wallet_data_hash; - - /** - * True if further processing is blocked by policy. - */ - bool policy_blocked; - -}; - - -/** - * @brief Data from a deposit operation. The combination of - * the coin's public key, the merchant's public key and the - * transaction ID must be unique. While a coin can (theoretically) be - * deposited at the same merchant twice (with partial spending), the - * merchant must either use a different public key or a different - * transaction ID for the two transactions. The same coin must not - * be used twice at the same merchant for the same transaction - * (as determined by transaction ID). - */ -struct TALER_EXCHANGEDB_Deposit -{ - /** - * Information about the coin that is being deposited. - */ - struct TALER_CoinPublicInfo coin; - - /** - * ECDSA signature affirming that the customer intends - * this coin to be deposited at the merchant identified - * by @e h_wire in relation to the proposal data identified - * by @e h_contract_terms. - */ - struct TALER_CoinSpendSignatureP csig; - - /** - * Public key of the merchant. Enables later identification - * of the merchant in case of a need to rollback transactions. - */ - struct TALER_MerchantPublicKeyP merchant_pub; - - /** - * Hash over the proposal data between merchant and customer - * (remains unknown to the Exchange). - */ - struct TALER_PrivateContractHashP h_contract_terms; - - /** - * Salt used by the merchant to compute "h_wire". - */ - struct TALER_WireSaltP wire_salt; - - /** - * Hash over inputs from the wallet to customize the contract. - */ - struct GNUNET_HashCode wallet_data_hash; - - /** - * Hash over the policy data for this deposit (remains unknown to the - * Exchange). Needed for the verification of the deposit's signature - */ - struct TALER_ExtensionPolicyHashP h_policy; - - /** - * Time when this request was generated. Used, for example, to - * assess when (roughly) the income was achieved for tax purposes. - * Note that the Exchange will only check that the timestamp is not "too - * far" into the future (i.e. several days). The fact that the - * timestamp falls within the validity period of the coin's - * denomination key is irrelevant for the validity of the deposit - * request, as obviously the customer and merchant could conspire to - * set any timestamp. Also, the Exchange must accept very old deposit - * requests, as the merchant might have been unable to transmit the - * deposit request in a timely fashion (so back-dating is not - * prevented). - */ - struct GNUNET_TIME_Timestamp timestamp; - - /** - * How much time does the merchant have to issue a refund request? - * Zero if refunds are not allowed. After this time, the coin - * cannot be refunded. - */ - struct GNUNET_TIME_Timestamp refund_deadline; - - /** - * How much time does the merchant have to execute the wire transfer? - * This time is advisory for aggregating transactions, not a hard - * constraint (as the merchant can theoretically pick any time, - * including one in the past). - */ - struct GNUNET_TIME_Timestamp wire_deadline; - - /** - * Fraction of the coin's remaining value to be deposited, including - * depositing fee (if any). The coin is identified by @e coin_pub. - */ - struct TALER_Amount amount_with_fee; - - /** - * Depositing fee. - */ - struct TALER_Amount deposit_fee; - - /** - * Information about the receiver for executing the transaction. URI in - * payto://-format. - */ - struct TALER_FullPayto receiver_wire_account; - - /** - * True if @e policy_json was provided - */ - bool has_policy; - - /** - * True if @e wallet_data_hash is not in use. - */ - bool no_wallet_data_hash; - -}; - - -/** - * @brief Specification for coin in a melt operation. - */ -struct TALER_EXCHANGEDB_Refresh -{ - /** - * Information about the coin that is being melted. - */ - struct TALER_CoinPublicInfo coin; - - /** - * Signature over the melting operation. - */ - struct TALER_CoinSpendSignatureP coin_sig; - - /** - * Refresh commitment this coin is melted into. - */ - struct TALER_RefreshCommitmentP rc; - - /** - * How much value is being melted? This amount includes the fees, - * so the final amount contributed to the melt is this value minus - * the fee for melting the coin. We include the fee in what is - * being signed so that we can verify a reserve's remaining total - * balance without needing to access the respective denomination key - * information each time. - */ - struct TALER_Amount amount_with_fee; - - /** - * Index (smaller #TALER_CNC_KAPPA) which the exchange has chosen to not - * have revealed during cut and choose. - */ - uint32_t noreveal_index; - -}; - - -/** - * Information about a /purses/$PID/deposit operation. - */ -struct TALER_EXCHANGEDB_PurseDeposit -{ - - /** - * Exchange hosting the purse, NULL for this exchange. - */ - char *exchange_base_url; - - /** - * Public key of the purse. - */ - struct TALER_PurseContractPublicKeyP purse_pub; - - /** - * Contribution of the coin to the purse, including - * deposit fee. - */ - struct TALER_Amount amount; - - /** - * Depositing fee. - */ - struct TALER_Amount deposit_fee; - - /** - * Signature by the coin affirming the deposit. - */ - struct TALER_CoinSpendSignatureP coin_sig; - - /** - * Public key of the coin. - */ - struct TALER_CoinSpendPublicKeyP coin_pub; - - /** - * Hash of the age commitment used to sign the coin, if age restriction was - * applicable to the denomination. May be all zeroes if no age restriction - * applies. - */ - struct TALER_AgeCommitmentHashP h_age_commitment; - - /** - * Set to true if @e h_age_commitment is not available. - */ - bool no_age_commitment; - -}; - - -/** - * Information about a melt operation since vDOLDPLUS of the protocol. - * This also includes the information for the reveal phase. - */ -struct TALER_EXCHANGEDB_Refresh_vDOLDPLUS -{ - /** - * Information about the coin that is being melted. - */ - struct TALER_CoinPublicInfo coin; - - /** - * Signature over the melting operation. - */ - struct TALER_CoinSpendSignatureP coin_sig; - - /** - * Refresh commitment this coin is melted into. - */ - struct TALER_RefreshCommitmentP rc; - - /** - * True if the client has successfully performed the reveal part - * of the refresh protocol, after the melt. - */ - bool is_revealed; - - /** - * @since vDOLDPLUS - * Mark if we have a v27 Refresh object. - * That is, the @a refresh_seed refers to the vDOLDPLUS master_refresh_seed - * from the original request, AND the client has provided transfer public keys, - * see below, @a transfer_public_keys - */ - bool is_v27_refresh; - - /** - * Public seed from which the refresh nonces (v27) or transfer secrets (vDOLDPLUS) - * per coin candidate were derived from. - */ - struct TALER_PublicRefreshMasterSeedP refresh_seed; - - /** - * How much value is being melted? This amount includes the fees, - * so the final amount contributed to the melt is this value minus - * the fee for melting the coin. We include the fee in what is - * being signed so that we can verify a reserve's remaining total - * balance without needing to access the respective denomination key - * information each time. - */ - struct TALER_Amount amount_with_fee; - - /** - * Number of coins to be refreshed into - */ - size_t num_coins; - - /** - * The running hash over all kappa * @a num_coins blinded coin envelopes, provided by - * the client. - */ - struct TALER_HashBlindedPlanchetsP planchets_h; - - /** - * The running hash over all chosen (noreveal_index) @a num_coins blinded coin envelopes. - */ - struct TALER_HashBlindedPlanchetsP selected_h; - - /** - * Array of @a num_coins denomination signatures of the blinded coins. - */ - struct TALER_BlindedDenominationSignature *denom_sigs; - - /** - * If @a is_v27_refresh is false, the client performed a vDOLDPLUS refresh, - * and has provided @a num_coins * kappa transfer public keys. - * This is the chosen (at index @a noreveal_index) array of @a num_coins transfer public keys. - */ - struct TALER_TransferPublicKeyP *transfer_pubs; - - /** - * Array of @a num_coins serial id's of the denominations. - * If @e coin.no_age_commitment is false, the denominations - * MUST support age restriction. - */ - uint64_t *denom_serials; - - /** - * Index (smaller #TALER_CNC_KAPPA) which the exchange chose to not - * to be revealed during cut and choose. - */ - uint32_t noreveal_index; - - /** - * True, if the client has successfully performed the reveal step - */ - bool revealed; - - /** - * If true, no @e blinding_seed is set and @e num_cs_r_values is 0. - */ - bool no_blinding_seed; - - /** - * If @e no_blinding_seed is false, the blinding seed for the nonces needed for - * blind CS signatures. - */ - struct TALER_BlindingMasterSeedP blinding_seed; - - /** - * Number of elements in @e cs_r_values. - */ - size_t num_cs_r_values; - - /** - * Array @e num_cs_r_values of public R-values for CS that were generated from the - * @e blinding_seed, a coin's index and the denomination's private key during the - * the /melt request, to ensure idempotency in case of expiration of a denomination. - * NULL if @e num_cs_r_values is 0. - */ - struct GNUNET_CRYPTO_CSPublicRPairP *cs_r_values; - - /** - * If @e num_cs_r_values is not 0, the bitvector of choices for the pairs - * in @e cs_r_values that was made by the exchange. The vector is in NBO - * and the lowest bit represents the choice for the pair at index 0 into @e cs_r_values; - */ - uint64_t cs_r_choices; - - /** - * [out]-Array of @a num_coins hashes of the public keys of the denominations - * identified by @e denom_serials. This field is set when calling - * get_refresh - */ - struct TALER_DenominationHashP *denom_pub_hashes; -}; - - -/** - * Generic KYC status for some operation. - */ -struct TALER_EXCHANGEDB_KycStatus -{ - - /** - * Account public key that is currently associated - * with the account. Only set if @e have_account_pub - * is true. - */ - union TALER_AccountPublicKeyP account_pub; - - /** - * Number that identifies the KYC requirement the operation - * was about. - */ - uint64_t requirement_row; - - /** - * True if @e account_pub is set. - */ - bool have_account_pub; - - /** - * True if the KYC status is "satisfied". - */ - bool ok; - -}; - - -/** - * Function called with details about incoming wire transfers. - * - * @param cls closure - * @param rowid unique serial ID for the refresh session in our DB - * @param reserve_pub public key of the reserve (also the wire subject) - * @param credit amount that was received - * @param sender_account_details information about the sender's bank account, in payto://-format - * @param wire_reference unique identifier for the wire transfer - * @param execution_date when did we receive the funds - * @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop - */ -typedef enum GNUNET_GenericReturnValue -(*TALER_EXCHANGEDB_ReserveInCallback)( - void *cls, - uint64_t rowid, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_Amount *credit, - const struct TALER_FullPayto sender_account_details, - uint64_t wire_reference, - struct GNUNET_TIME_Timestamp execution_date); - - -/** - * Function called with the results of the lookup of the - * wire transfer data of the exchange. - * - * @param cls closure - * @param rowid identifier of the respective row in the database - * @param date timestamp of the wire transfer (roughly) - * @param wtid wire transfer subject - * @param payto_uri details of the receiver, URI in payto://-format - * @param amount amount that was wired - * @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration - */ -typedef enum GNUNET_GenericReturnValue -(*TALER_EXCHANGEDB_WireTransferOutCallback)( - void *cls, - uint64_t rowid, - struct GNUNET_TIME_Timestamp date, - const struct TALER_WireTransferIdentifierRawP *wtid, - const struct TALER_FullPayto payto_uri, - const struct TALER_Amount *amount); - - -/** - * Function called with details about expired reserves. - * - * @param cls closure - * @param reserve_pub public key of the reserve - * @param left amount left in the reserve - * @param account_details information about the reserve's bank account, in payto://-format - * @param expiration_date when did the reserve expire - * @param close_request_row row that caused the reserve - * to be closed, 0 if it expired without request - * @return #GNUNET_OK on success, - * #GNUNET_NO to retry - * #GNUNET_SYSERR on hard failures (exit) - */ -typedef enum GNUNET_GenericReturnValue -(*TALER_EXCHANGEDB_ReserveExpiredCallback)( - void *cls, - const struct TALER_ReservePublicKeyP *reserve_pub, - const struct TALER_Amount *left, - const struct TALER_FullPayto account_details, - struct GNUNET_TIME_Timestamp expiration_date, - uint64_t close_request_row); - - -/** - * Callback that is given AML-relevant transfer data. - * - * @param cls closure - * @param row_id current row in AML status table - * @param payto_uri account involved with the wire transfer - * @param execution_time when was the transfer made - * @param amount wire amount of the transfer - */ -typedef void -(*TALER_EXCHANGEDB_AmlTransferCallback)( - void *cls, - uint64_t row_id, - const char *payto_uri, - struct GNUNET_TIME_Absolute execution_time, - const struct TALER_Amount *amount); - - -/** - * Initialize the database connection. - * - * @param cfg configuration to use - * @param skip_preflight true if we should skip the usual - * preflight check which assures us that the DB is actually - * operational; only taler-exchange-dbinit should use true here. - * @return NULL on failure - */ -struct TALER_EXCHANGEDB_PostgresContext * -TALER_EXCHANGEDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, - bool skip_preflight); - - -/** - * Shutdown the database connection. - * - * @param[in] pg connection to drop - */ -void -TALER_EXCHANGEDB_disconnect (struct TALER_EXCHANGEDB_PostgresContext *pg); - - -/** - * Meta data about a denomination public key. - * If this is changed, you must also adjust - * taler-exchange-httpd-post-management-keys.c::denomination_meta_cmp(). - */ -struct TALER_EXCHANGEDB_DenominationKeyMetaData -{ - /** - * Serial of the denomination key as in the DB. - * Can be used calls to stored procedures in order to spare - * additional lookups. - */ - uint64_t serial; - - /** - * Start time of the validity period for this key. - */ - struct GNUNET_TIME_Timestamp start; - - /** - * The exchange will sign fresh coins between @e start and this time. - * @e expire_withdraw will be somewhat larger than @e start to - * ensure a sufficiently large anonymity set, while also allowing - * the Exchange to limit the financial damage in case of a key being - * compromised. Thus, exchanges with low volume are expected to have a - * longer withdraw period (@e expire_withdraw - @e start) than exchanges - * with high transaction volume. The period may also differ between - * types of coins. A exchange may also have a few denomination keys - * with the same value with overlapping validity periods, to address - * issues such as clock skew. - */ - struct GNUNET_TIME_Timestamp expire_withdraw; - - /** - * Coins signed with the denomination key must be spent or refreshed - * between @e start and this expiration time. After this time, the - * exchange will refuse transactions involving this key as it will - * "drop" the table with double-spending information (shortly after) - * this time. Note that wallets should refresh coins significantly - * before this time to be on the safe side. @e expire_deposit must be - * significantly larger than @e expire_withdraw (by months or even - * years). - */ - struct GNUNET_TIME_Timestamp expire_deposit; - - /** - * When do signatures with this denomination key become invalid? - * After this point, these signatures cannot be used in (legal) - * disputes anymore, as the Exchange is then allowed to destroy its side - * of the evidence. @e expire_legal is expected to be significantly - * larger than @e expire_deposit (by a year or more). - */ - struct GNUNET_TIME_Timestamp expire_legal; - - /** - * The value of the coins signed with this denomination key. - */ - struct TALER_Amount value; - - /** - * The fees the exchange charges for operations with - * coins of this denomination. - */ - struct TALER_DenomFeeSet fees; - - /** - * Age restriction for the denomination. (can be zero). If not zero, the bits - * set in the mask mark the edges at the beginning of a next age group. F.e. - * for the age groups - * 0-7, 8-9, 10-11, 12-14, 14-15, 16-17, 18-21, 21-* - * the following bits are set: - * - * 31 24 16 8 0 - * | | | | | - * oooooooo oo1oo1o1 o1o1o1o1 ooooooo1 - * - * A value of 0 means that the denomination does not support the extension for - * age-restriction. - */ - struct TALER_AgeMask age_mask; -}; - - -/** - * Information about an account from the configuration. - */ -struct TALER_EXCHANGEDB_AccountInfo -{ - /** - * Authentication data. Only parsed if - * #TALER_EXCHANGEDB_ALO_AUTHDATA was set. - */ - const struct TALER_BANK_AuthenticationData *auth; - - /** - * Section in the configuration file that specifies the - * account. Must start with "exchange-account-". - */ - const char *section_name; - - /** - * Name of the wire method used by this account. - */ - const char *method; - - /** - * Full payto://-URI of the account. Do not free(), aliased - * with the underlying `struct WireAccount`. - */ - struct TALER_FullPayto payto_uri; - - /** - * true if this account is enabled to be debited - * by the taler-exchange-aggregator. - */ - bool debit_enabled; - - /** - * true if this account is enabled to be credited by wallets - * and needs to be watched by the taler-exchange-wirewatch. - * Also, the account will only be included in /wire if credit - * is enabled. - */ - bool credit_enabled; -}; - - -/** - * Function called with information about a wire account. - * - * @param cls closure - * @param ai account information - */ -typedef void -(*TALER_EXCHANGEDB_AccountCallback)( - void *cls, - const struct TALER_EXCHANGEDB_AccountInfo *ai); - - -/** - * Return information about all accounts that - * were loaded by #TALER_EXCHANGEDB_load_accounts(). - * - * @param cb callback to invoke - * @param cb_cls closure for @a cb - */ -void -TALER_EXCHANGEDB_find_accounts (TALER_EXCHANGEDB_AccountCallback cb, - void *cb_cls); - - -/** - * Find the wire plugin for the given payto:// URL. - * Only useful after the accounts have been loaded - * using #TALER_EXCHANGEDB_load_accounts(). - * - * @param method wire method we need an account for - * @return NULL on error - */ -const struct TALER_EXCHANGEDB_AccountInfo * -TALER_EXCHANGEDB_find_account_by_method (const char *method); - - -/** - * Find the wire plugin for the given payto:// URL - * Only useful after the accounts have been loaded - * using #TALER_EXCHANGEDB_load_accounts(). - * - * @param url wire address we need an account for - * @return NULL on error - */ -const struct TALER_EXCHANGEDB_AccountInfo * -TALER_EXCHANGEDB_find_account_by_payto_uri ( - const struct TALER_FullPayto url); - - -/** - * Options for #TALER_EXCHANGEDB_load_accounts() - */ -enum TALER_EXCHANGEDB_AccountLoaderOptions -{ - TALER_EXCHANGEDB_ALO_NONE = 0, - - /** - * Load accounts enabled for DEBITs. - */ - TALER_EXCHANGEDB_ALO_DEBIT = 1, - - /** - * Load accounts enabled for CREDITs. - */ - TALER_EXCHANGEDB_ALO_CREDIT = 2, - - /** - * Load authentication data from the - * "taler-accountcredentials-" section - * to access the account at the bank. - */ - TALER_EXCHANGEDB_ALO_AUTHDATA = 4 -}; - - -/** - * Load account information op the exchange from @a cfg. - * - * @param cfg configuration to load from - * @param options loader options - * @return #GNUNET_OK on success, #GNUNET_NO if no accounts are configured - */ -enum GNUNET_GenericReturnValue -TALER_EXCHANGEDB_load_accounts ( - const struct GNUNET_CONFIGURATION_Handle *cfg, - enum TALER_EXCHANGEDB_AccountLoaderOptions options); - - -/** - * Free resources allocated by - * #TALER_EXCHANGEDB_load_accounts(). - */ -void -TALER_EXCHANGEDB_unload_accounts (void); - - -#endif diff --git a/src/include/taler/taler_kyclogic_plugin.h b/src/include/taler/taler_kyclogic_plugin.h @@ -238,7 +238,7 @@ struct TALER_KYCLOGIC_Plugin; */ struct TALER_EXCHANGEDB_PostgresContext; -#include <taler/taler_exchangedb_lib.h> +#include <exchangedb_lib.h> /** diff --git a/src/json/conversion.c b/src/json/conversion.c @@ -18,7 +18,7 @@ * @brief helper routines to run some external JSON-to-JSON converter * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" #include <gnunet/gnunet_util_lib.h> diff --git a/src/json/i18n.c b/src/json/i18n.c @@ -18,7 +18,7 @@ * @brief helper functions for i18n in JSON processing * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_json_lib.h" diff --git a/src/kyclogic/kyclogic_api.c b/src/kyclogic/kyclogic_api.c @@ -18,7 +18,7 @@ * @brief server-side KYC API * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include "taler/taler_kyclogic_lib.h" diff --git a/src/kyclogic/kyclogic_sanctions.c b/src/kyclogic/kyclogic_sanctions.c @@ -18,7 +18,7 @@ * @brief wrapper around sanction list evaluator * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_json_lib.h" #include "taler/taler_kyclogic_lib.h" diff --git a/src/kyclogic/taler-exchange-kyc-tester.c b/src/kyclogic/taler-exchange-kyc-tester.c @@ -19,7 +19,7 @@ * @author Christian Grothoff * @defgroup request Request handling routines */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <jansson.h> #include <microhttpd.h> diff --git a/src/lib/exchange_api_get-keys.c b/src/lib/exchange_api_get-keys.c @@ -20,7 +20,7 @@ * @author Sree Harsha Totakura <sreeharsha@totakura.in> * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <microhttpd.h> #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_json_lib.h" diff --git a/src/lib/exchange_api_get-kyc-check-H_NORMALIZED_PAYTO.c b/src/lib/exchange_api_get-kyc-check-H_NORMALIZED_PAYTO.c @@ -19,7 +19,7 @@ * @brief Implementation of the /kyc-check request * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <microhttpd.h> /* just for HTTP check codes */ #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_curl_lib.h> diff --git a/src/lib/exchange_api_post-coins-COIN_PUB-refund.c b/src/lib/exchange_api_post-coins-COIN_PUB-refund.c @@ -19,7 +19,7 @@ * @brief Implementation of the /refund request of the exchange's HTTP API * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <jansson.h> #include <microhttpd.h> /* just for HTTP status codes */ #include <gnunet/gnunet_util_lib.h> diff --git a/src/lib/exchange_api_restrictions.c b/src/lib/exchange_api_restrictions.c @@ -19,7 +19,7 @@ * @brief convenience functions related to account restrictions a * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_exchange_service.h" /* UNNECESSARY? */ #include <regex.h> diff --git a/src/mhd/mhd2_legal.c b/src/mhd/mhd2_legal.c @@ -19,7 +19,7 @@ * and content type preferences * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> diff --git a/src/mhd/mhd2_responses.c b/src/mhd/mhd2_responses.c @@ -20,7 +20,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <zlib.h> #include "taler/taler_util.h" #include "taler/taler_mhd2_lib.h" diff --git a/src/mhd/mhd2_spa.c b/src/mhd/mhd2_spa.c @@ -18,7 +18,7 @@ * @brief logic to load single page apps * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_mhd2_lib.h" diff --git a/src/mhd/mhd_config.c b/src/mhd/mhd_config.c @@ -20,7 +20,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_mhd_lib.h" diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c @@ -19,7 +19,7 @@ * and content type preferences * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <gnunet/gnunet_util_lib.h> #include <gnunet/gnunet_json_lib.h> #include <jansson.h> diff --git a/src/mhd/mhd_responses.c b/src/mhd/mhd_responses.c @@ -20,7 +20,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include <zlib.h> #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" diff --git a/src/mhd/mhd_spa.c b/src/mhd/mhd_spa.c @@ -18,7 +18,7 @@ * @brief logic to load single page apps * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" diff --git a/src/mhd/mhd_typst.c b/src/mhd/mhd_typst.c @@ -20,7 +20,7 @@ * * */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" #include <microhttpd.h> diff --git a/src/sq/test_sq.c b/src/sq/test_sq.c @@ -18,7 +18,7 @@ * @brief Tests for SQLite3 convenience API * @author Jonathan Buchanan */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_sq_lib.h" diff --git a/src/templating/templating_api.c b/src/templating/templating_api.c @@ -18,7 +18,7 @@ * @brief logic to load and complete HTML templates * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" diff --git a/src/templating/test1/Makefile b/src/templating/test1/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test2/Makefile b/src/templating/test2/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test3/Makefile b/src/templating/test3/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test4/Makefile b/src/templating/test4/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test5/Makefile b/src/templating/test5/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test6/Makefile b/src/templating/test6/Makefile @@ -1,12 +0,0 @@ -.PHONY: test clean - -test-custom-write: test-custom-write.c ../mustach-json-c.h ../mustach-json-c.c ../mustach-wrap.c ../mustach.h ../mustach.c - @echo building test-custom-write - $(CC) $(CFLAGS) $(LDFLAGS) -g -o test-custom-write test-custom-write.c ../mustach.c ../mustach-json-c.c ../mustach-wrap.c -ljson-c - -test: test-custom-write - @mustach=./test-custom-write ../dotest.sh json -U must -l must -x must - -clean: - rm -f resu.last vg.last test-custom-write - diff --git a/src/templating/test7/Makefile b/src/templating/test7/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json base.mustache - -clean: - rm -f resu.last vg.last - diff --git a/src/templating/test8/Makefile b/src/templating/test8/Makefile @@ -1,8 +0,0 @@ -.PHONY: test clean - -test: - @../dotest.sh json must - -clean: - rm -f resu.last vg.last - diff --git a/src/include/taler/backoff.h b/src/testing/backoff.h diff --git a/src/testing/test_auditor_api_version.c b/src/testing/test_auditor_api_version.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "taler/taler_auditor_service.h" diff --git a/src/testing/test_bank_api_twisted.c b/src/testing/test_bank_api_twisted.c @@ -22,7 +22,7 @@ * @author Sree Harsha Totakura <sreeharsha@totakura.in> * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "taler/taler_json_lib.h" diff --git a/src/testing/test_exchange_api_twisted.c b/src/testing/test_exchange_api_twisted.c @@ -23,7 +23,7 @@ * @author Sree Harsha Totakura <sreeharsha@totakura.in> * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "taler/taler_json_lib.h" diff --git a/src/testing/test_taler_exchange_aggregator.c b/src/testing/test_taler_exchange_aggregator.c @@ -23,7 +23,7 @@ #include "taler/taler_util.h" #include <gnunet/gnunet_json_lib.h> #include "taler/taler_json_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" #include <microhttpd.h> #include "taler/taler_testing_lib.h" diff --git a/src/testing/testing_api_cmd_auditor_deposit_confirmation.c b/src/testing/testing_api_cmd_auditor_deposit_confirmation.c @@ -25,7 +25,7 @@ #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_auditor_service.h" #include "taler/taler_testing_lib.h" -#include "taler/backoff.h" +#include "backoff.h" /** * How long do we wait AT MOST when retrying? diff --git a/src/testing/testing_api_cmd_auditor_exec_auditor.c b/src/testing/testing_api_cmd_auditor_exec_auditor.c @@ -22,7 +22,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_auditor_exec_auditor_dbinit.c b/src/testing/testing_api_cmd_auditor_exec_auditor_dbinit.c @@ -22,7 +22,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_bank_admin_add_incoming.c b/src/testing/testing_api_cmd_bank_admin_add_incoming.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/backoff.h" +#include "backoff.h" #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_bank_service.h" diff --git a/src/testing/testing_api_cmd_bank_transfer.c b/src/testing/testing_api_cmd_bank_transfer.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/backoff.h" +#include "backoff.h" #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_bank_service.h" diff --git a/src/testing/testing_api_cmd_batch_deposit.c b/src/testing/testing_api_cmd_batch_deposit.c @@ -26,7 +26,7 @@ #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" -#include "taler/backoff.h" +#include "backoff.h" /** diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c @@ -25,7 +25,7 @@ #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" -#include "taler/backoff.h" +#include "backoff.h" /** diff --git a/src/testing/testing_api_cmd_exec_aggregator.c b/src/testing/testing_api_cmd_exec_aggregator.c @@ -21,7 +21,7 @@ * @brief run the taler-exchange-aggregator command * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_auditor-offline.c b/src/testing/testing_api_cmd_exec_auditor-offline.c @@ -21,7 +21,7 @@ * @brief run the taler-exchange-auditor-offline command * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_closer.c b/src/testing/testing_api_cmd_exec_closer.c @@ -21,7 +21,7 @@ * @brief run the taler-exchange-closer command * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" diff --git a/src/testing/testing_api_cmd_exec_expire.c b/src/testing/testing_api_cmd_exec_expire.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_router.c b/src/testing/testing_api_cmd_exec_router.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_transfer.c b/src/testing/testing_api_cmd_exec_transfer.c @@ -21,7 +21,7 @@ * @brief run the taler-exchange-transfer command * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_wget.c b/src/testing/testing_api_cmd_exec_wget.c @@ -21,7 +21,7 @@ * @brief run a wget command * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_exec_wirewatch.c b/src/testing/testing_api_cmd_exec_wirewatch.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_insert_deposit.c b/src/testing/testing_api_cmd_insert_deposit.c @@ -22,14 +22,14 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" #include "taler/taler_testing_lib.h" -#include "taler/taler_exchangedb_lib.h" -#include "taler/taler_exchangedb_lib.h" +#include "exchangedb_lib.h" +#include "exchangedb_lib.h" #include "exchange-database/rollback.h" #include "exchange-database/start.h" /* UNNECESSARY? */ #include "exchange-database/commit.h" diff --git a/src/testing/testing_api_cmd_offline_sign_extensions.c b/src/testing/testing_api_cmd_offline_sign_extensions.c @@ -22,7 +22,7 @@ * @brief run the taler-exchange-offline command to sign extensions (and therefore activate them) * @author Özgür Kesim */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_offline_sign_global_fees.c b/src/testing/testing_api_cmd_offline_sign_global_fees.c @@ -23,7 +23,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_offline_sign_keys.c b/src/testing/testing_api_cmd_offline_sign_keys.c @@ -23,7 +23,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_offline_sign_wire_fees.c b/src/testing/testing_api_cmd_offline_sign_wire_fees.c @@ -23,7 +23,7 @@ * @author Marcello Stanisci * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_refresh.c b/src/testing/testing_api_cmd_refresh.c @@ -26,7 +26,7 @@ #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_testing_lib.h" #include "taler/taler_signatures.h" -#include "taler/backoff.h" +#include "backoff.h" /** * How long do we wait AT MOST when retrying? diff --git a/src/testing/testing_api_cmd_revoke.c b/src/testing/testing_api_cmd_revoke.c @@ -21,7 +21,7 @@ * @brief Implement the revoke test command. * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_testing_lib.h" diff --git a/src/testing/testing_api_cmd_system_start.c b/src/testing/testing_api_cmd_system_start.c @@ -21,7 +21,7 @@ * @brief run taler-benchmark-setup.sh command * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_json_lib.h" #include <gnunet/gnunet_curl_lib.h> #include "taler/taler_signatures.h" /* UNNECESSARY? */ diff --git a/src/testing/testing_api_cmd_twister_exec_client.c b/src/testing/testing_api_cmd_twister_exec_client.c @@ -25,7 +25,7 @@ * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_testing_lib.h" #include "taler/taler_twister_testing_lib.h" diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c @@ -29,7 +29,7 @@ #include "taler/taler_signatures.h" #include "taler/taler_extensions.h" #include "taler/taler_testing_lib.h" -#include "taler/backoff.h" +#include "backoff.h" /** diff --git a/src/testing/testing_api_misc.c b/src/testing/testing_api_misc.c @@ -21,7 +21,7 @@ * @brief non-command functions useful for writing tests * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_testing_lib.h" #include "taler/taler_fakebank_lib.h" diff --git a/src/testing/testing_api_twister_helpers.c b/src/testing/testing_api_twister_helpers.c @@ -23,7 +23,7 @@ * @author Christian Grothoff * @author Marcello Stanisci */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include <taler/taler_twister_service.h> #include "taler/taler_twister_testing_lib.h" diff --git a/src/util/age_restriction.c b/src/util/age_restriction.c @@ -18,7 +18,7 @@ * @brief Functions that are used for age restriction * @author Özgür Kesim */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include <gnunet/gnunet_json_lib.h> diff --git a/src/util/amount.c b/src/util/amount.c @@ -21,7 +21,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/config.c b/src/util/config.c @@ -19,7 +19,7 @@ * @author Florian Dold * @author Benedikt Mueller */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include <gnunet/gnunet_json_lib.h> diff --git a/src/util/crypto.c b/src/util/crypto.c @@ -22,7 +22,7 @@ * @author Christian Grothoff * @author Özgür Kesim */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include <gcrypt.h> diff --git a/src/util/crypto_confirmation.c b/src/util/crypto_confirmation.c @@ -19,7 +19,7 @@ * @author Christian Grothoff * @author Priscilla Huang */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_mhd_lib.h" #include <gnunet/gnunet_db_lib.h> diff --git a/src/util/crypto_helper_common.c b/src/util/crypto_helper_common.c @@ -18,7 +18,7 @@ * @brief Common functions for the exchange security modules * @author Florian Dold <dold@taler.net> */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" #include "taler/taler_signatures.h" /* UNNECESSARY? */ #include "crypto_helper_common.h" diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c @@ -18,7 +18,7 @@ * @brief utility functions for running out-of-process private key operations * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "secmod_cs.h" diff --git a/src/util/crypto_helper_esign.c b/src/util/crypto_helper_esign.c @@ -18,7 +18,7 @@ * @brief utility functions for running out-of-process private key operations * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "secmod_eddsa.h" diff --git a/src/util/crypto_helper_rsa.c b/src/util/crypto_helper_rsa.c @@ -18,7 +18,7 @@ * @brief utility functions for running out-of-process private key operations * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "taler/taler_signatures.h" #include "crypto_helper_common.h" diff --git a/src/util/getopt.c b/src/util/getopt.c @@ -18,7 +18,7 @@ * @brief Helper functions for parsing Taler-specific command-line arguments * @author Florian Dold */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/iban.c b/src/util/iban.c @@ -18,7 +18,7 @@ * @brief Common utility function for dealing with IBAN numbers * @author Florian Dold */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" diff --git a/src/util/lang.c b/src/util/lang.c @@ -18,7 +18,7 @@ * @brief Utility functions for parsing and matching RFC 7231 language strings. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" /** diff --git a/src/util/os_installation.c b/src/util/os_installation.c @@ -22,7 +22,7 @@ * @brief initialize libgnunet OS subsystem for Taler. * @author Christian Grothoff */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include <gnunet/gnunet_util_lib.h> #include "taler/taler_util.h" diff --git a/src/util/payto.c b/src/util/payto.c @@ -18,7 +18,7 @@ * @brief Common utility functions for dealing with payto://-URIs * @author Florian Dold */ -#include "taler/platform.h" /* UNNECESSARY? */ +#include "platform.h" /* UNNECESSARY? */ #include "taler/taler_util.h" diff --git a/src/util/secmod_common.c b/src/util/secmod_common.c @@ -18,7 +18,7 @@ * @brief Common functions for the exchange security modules * @author Florian Dold <dold@taler.net> */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "secmod_common.h" #include <poll.h> diff --git a/src/util/secmod_cs.c b/src/util/secmod_cs.c @@ -31,7 +31,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "secmod_cs.h" #include <gcrypt.h> diff --git a/src/util/secmod_eddsa.c b/src/util/secmod_eddsa.c @@ -32,7 +32,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "secmod_eddsa.h" #include <gcrypt.h> diff --git a/src/util/secmod_rsa.c b/src/util/secmod_rsa.c @@ -31,7 +31,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include "secmod_rsa.h" #include <gcrypt.h> diff --git a/src/util/taler-auditor-config.c b/src/util/taler-auditor-config.c @@ -22,7 +22,7 @@ * @brief tool to access and manipulate Taler configuration files * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/taler-exchange-config.c b/src/util/taler-exchange-config.c @@ -22,7 +22,7 @@ * @brief tool to access and manipulate Taler configuration files * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/taler-exchange-secmod-cs.c b/src/util/taler-exchange-secmod-cs.c @@ -31,7 +31,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" /** diff --git a/src/util/taler-exchange-secmod-eddsa.c b/src/util/taler-exchange-secmod-eddsa.c @@ -32,7 +32,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/taler-exchange-secmod-rsa.c b/src/util/taler-exchange-secmod-rsa.c @@ -31,7 +31,7 @@ * private key. This is done by reference counting (as work is always * assigned and collected by the main thread). */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" diff --git a/src/util/test_age_restriction.c b/src/util/test_age_restriction.c @@ -19,7 +19,7 @@ * @brief Tests for age restriction specific logic * @author Özgür Kesim */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include <gnunet/gnunet_common.h> diff --git a/src/util/test_helper_cs.c b/src/util/test_helper_cs.c @@ -18,7 +18,7 @@ * @brief Tests for CS crypto helper * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" /** diff --git a/src/util/test_helper_eddsa.c b/src/util/test_helper_eddsa.c @@ -18,7 +18,7 @@ * @brief Tests for EDDSA crypto helper * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include <gnunet/gnunet_signatures.h> diff --git a/src/util/test_helper_rsa.c b/src/util/test_helper_rsa.c @@ -18,7 +18,7 @@ * @brief Tests for RSA crypto helper * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" /** diff --git a/src/util/util.c b/src/util/util.c @@ -21,7 +21,7 @@ * @author Benedikt Mueller * @author Christian Grothoff */ -#include "taler/platform.h" +#include "platform.h" #include "taler/taler_util.h" #include <gnunet/gnunet_json_lib.h> #include <unistr.h>