aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------doc/prebuilt0
-rw-r--r--src/auditor/taler-auditor-sign.c40
-rw-r--r--src/auditordb/plugin_auditordb_postgres.c506
-rw-r--r--src/bank-lib/bank_api_admin.c20
-rw-r--r--src/bank-lib/bank_api_transfer.c31
-rw-r--r--src/bank-lib/fakebank.c30
-rw-r--r--src/exchangedb/exchangedb_accounts.c10
-rw-r--r--src/exchangedb/exchangedb_auditorkeys.c137
-rw-r--r--src/exchangedb/exchangedb_denomkeys.c254
-rw-r--r--src/exchangedb/exchangedb_plugin.c6
-rw-r--r--src/exchangedb/exchangedb_signkeys.c52
-rw-r--r--src/exchangedb/exchangedb_transactions.c10
-rw-r--r--src/exchangedb/plugin_exchangedb_postgres.c427
-rw-r--r--src/include/taler_auditordb_plugin.h366
-rw-r--r--src/include/taler_bank_service.h62
-rw-r--r--src/include/taler_crypto_lib.h66
-rw-r--r--src/include/taler_exchange_service.h357
-rw-r--r--src/include/taler_exchangedb_lib.h125
-rw-r--r--src/include/taler_exchangedb_plugin.h590
-rw-r--r--src/include/taler_fakebank_lib.h34
-rw-r--r--src/include/taler_json_lib.h12
-rw-r--r--src/util/crypto.c28
-rw-r--r--src/util/crypto_wire.c38
23 files changed, 1514 insertions, 1687 deletions
diff --git a/doc/prebuilt b/doc/prebuilt
-Subproject ca53235ccfa0458ebf11c204888ca370e20ec3f
+Subproject 934a6a18301e81c4fd1b3a8cda2dc13dca4741c
diff --git a/src/auditor/taler-auditor-sign.c b/src/auditor/taler-auditor-sign.c
index cc0ede6f4..183c63731 100644
--- a/src/auditor/taler-auditor-sign.c
+++ b/src/auditor/taler-auditor-sign.c
@@ -190,8 +190,8 @@ main (int argc,
struct TALER_AuditorSignatureP *sigs;
struct TALER_AuditorPublicKeyP apub;
struct GNUNET_DISK_FileHandle *fh;
- struct TALER_DenominationKeyValidityPS *dks;
- unsigned int dks_len;
+ struct TALER_DenominationKeyValidityPS *dki;
+ unsigned int dki_len;
struct TALER_ExchangeKeyValidityPS kv;
off_t in_size;
@@ -287,8 +287,8 @@ main (int argc,
GNUNET_free (eddsa_priv);
return 1;
}
- dks_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS);
- if (0 == dks_len)
+ dki_len = in_size / sizeof (struct TALER_DenominationKeyValidityPS);
+ if (0 == dki_len)
{
fprintf (stderr,
"Failed to produce auditor signature, denomination list is empty.\n");
@@ -312,13 +312,13 @@ main (int argc,
strlen (auditor_url) + 1,
&kv.auditor_url_hash);
kv.master = master_public_key;
- dks = GNUNET_new_array (dks_len,
+ dki = GNUNET_new_array (dki_len,
struct TALER_DenominationKeyValidityPS);
- sigs = GNUNET_new_array (dks_len,
+ sigs = GNUNET_new_array (dki_len,
struct TALER_AuditorSignatureP);
if (in_size !=
GNUNET_DISK_file_read (fh,
- dks,
+ dki,
in_size))
{
fprintf (stderr,
@@ -328,14 +328,14 @@ main (int argc,
TALER_AUDITORDB_plugin_unload (adb);
GNUNET_DISK_file_close (fh);
GNUNET_free (sigs);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (eddsa_priv);
return 1;
}
GNUNET_DISK_file_close (fh);
- for (unsigned int i = 0; i<dks_len; i++)
+ for (unsigned int i = 0; i<dki_len; i++)
{
- struct TALER_DenominationKeyValidityPS *dk = &dks[i];
+ struct TALER_DenominationKeyValidityPS *dk = &dki[i];
if (verbose)
print_dk (dk);
@@ -362,7 +362,7 @@ main (int argc,
fprintf (stderr,
"Output file not given\n");
TALER_AUDITORDB_plugin_unload (adb);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (sigs);
GNUNET_free (eddsa_priv);
return 1;
@@ -375,7 +375,7 @@ main (int argc,
fprintf (stderr,
"Failed to create tables in auditor's database\n");
TALER_AUDITORDB_plugin_unload (adb);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (sigs);
GNUNET_free (eddsa_priv);
return 3;
@@ -396,14 +396,14 @@ main (int argc,
fprintf (stderr,
"Failed to initialize database session\n");
TALER_AUDITORDB_plugin_unload (adb);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (sigs);
GNUNET_free (eddsa_priv);
return 3;
}
- for (unsigned int i = 0; i<dks_len; i++)
+ for (unsigned int i = 0; i<dki_len; i++)
{
- const struct TALER_DenominationKeyValidityPS *dk = &dks[i];
+ const struct TALER_DenominationKeyValidityPS *dk = &dki[i];
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Adding denomination key %s to auditor database\n",
@@ -416,7 +416,7 @@ main (int argc,
fprintf (stderr,
"Failed to store key in auditor DB (did you add the exchange using taler-auditor-exchange first?)\n");
TALER_AUDITORDB_plugin_unload (adb);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (sigs);
GNUNET_free (eddsa_priv);
return 3;
@@ -432,19 +432,19 @@ main (int argc,
auditor_url,
sigs,
&master_public_key,
- dks_len,
- dks))
+ dki_len,
+ dki))
{
fprintf (stderr,
"Failed to write to file `%s': %s\n",
output_file,
strerror (errno));
GNUNET_free (sigs);
- GNUNET_free (dks);
+ GNUNET_free (dki);
return 1;
}
GNUNET_free (sigs);
- GNUNET_free (dks);
+ GNUNET_free (dki);
GNUNET_free (eddsa_priv);
return 0;
}
diff --git a/src/auditordb/plugin_auditordb_postgres.c b/src/auditordb/plugin_auditordb_postgres.c
index ca07d406b..4515e7795 100644
--- a/src/auditordb/plugin_auditordb_postgres.c
+++ b/src/auditordb/plugin_auditordb_postgres.c
@@ -1080,10 +1080,10 @@ postgres_list_exchanges (void *cls,
* @return query result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_exchange_signkey (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_AUDITORDB_ExchangeSigningKey *sk)
+postgres_insert_exchange_signkey (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_AUDITORDB_ExchangeSigningKey *sk)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&sk->master_public_key),
@@ -1111,10 +1111,10 @@ postgres_insert_exchange_signkey (void *cls,
* @return query result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_deposit_confirmation (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_AUDITORDB_DepositConfirmation *dc)
+postgres_insert_deposit_confirmation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_AUDITORDB_DepositConfirmation *dc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&dc->master_public_key),
@@ -1250,14 +1250,13 @@ deposit_confirmation_cb (void *cls,
* @return query result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_deposit_confirmations (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_public_key,
- uint64_t start_id,
- TALER_AUDITORDB_DepositConfirmationCallback
- cb,
- void *cb_cls)
+postgres_get_deposit_confirmations (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_public_key,
+ uint64_t start_id,
+ TALER_AUDITORDB_DepositConfirmationCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -1296,10 +1295,10 @@ postgres_get_deposit_confirmations (void *cls,
* @return operation status result
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_denomination_info (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_DenominationKeyValidityPS *issue)
+postgres_insert_denomination_info (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_DenominationKeyValidityPS *issue)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&issue->denom_hash),
@@ -1438,13 +1437,12 @@ denomination_info_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_denomination_info (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_AUDITORDB_DenominationInfoDataCallback
- cb,
- void *cb_cls)
+postgres_select_denomination_info (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_AUDITORDB_DenominationInfoDataCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -1483,14 +1481,11 @@ postgres_select_denomination_info (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_auditor_progress_reserve (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointReserve *
- ppr)
+postgres_insert_auditor_progress_reserve (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointReserve *ppr)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1519,14 +1514,11 @@ postgres_insert_auditor_progress_reserve (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_auditor_progress_reserve (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointReserve *
- ppr)
+postgres_update_auditor_progress_reserve (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointReserve *ppr)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&ppr->last_reserve_in_serial_id),
@@ -1554,12 +1546,11 @@ postgres_update_auditor_progress_reserve (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_auditor_progress_reserve (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct
- TALER_AUDITORDB_ProgressPointReserve *ppr)
+postgres_get_auditor_progress_reserve (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointReserve *ppr)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1596,14 +1587,11 @@ postgres_get_auditor_progress_reserve (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_auditor_progress_aggregation (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointAggregation
- *ppa)
+postgres_insert_auditor_progress_aggregation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1629,14 +1617,11 @@ postgres_insert_auditor_progress_aggregation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_auditor_progress_aggregation (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointAggregation
- *ppa)
+postgres_update_auditor_progress_aggregation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&ppa->last_wire_out_serial_id),
@@ -1661,14 +1646,11 @@ postgres_update_auditor_progress_aggregation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_auditor_progress_aggregation (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct
- TALER_AUDITORDB_ProgressPointAggregation
- *ppa)
+postgres_get_auditor_progress_aggregation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointAggregation *ppa)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1699,16 +1681,11 @@ postgres_get_auditor_progress_aggregation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_auditor_progress_deposit_confirmation (void *cls,
- struct
- TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc)
+postgres_insert_auditor_progress_deposit_confirmation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1734,16 +1711,11 @@ postgres_insert_auditor_progress_deposit_confirmation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_auditor_progress_deposit_confirmation (void *cls,
- struct
- TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc)
+postgres_update_auditor_progress_deposit_confirmation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&ppdc->last_deposit_confirmation_serial_id),
@@ -1768,16 +1740,11 @@ postgres_update_auditor_progress_deposit_confirmation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_auditor_progress_deposit_confirmation (void *cls,
- struct
- TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc)
+postgres_get_auditor_progress_deposit_confirmation (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1808,12 +1775,11 @@ postgres_get_auditor_progress_deposit_confirmation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_auditor_progress_coin (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointCoin *ppc)
+postgres_insert_auditor_progress_coin (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointCoin *ppc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1844,12 +1810,11 @@ postgres_insert_auditor_progress_coin (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_auditor_progress_coin (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointCoin *ppc)
+postgres_update_auditor_progress_coin (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointCoin *ppc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&ppc->last_withdraw_serial_id),
@@ -1879,12 +1844,11 @@ postgres_update_auditor_progress_coin (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_auditor_progress_coin (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct TALER_AUDITORDB_ProgressPointCoin *
- ppc)
+postgres_get_auditor_progress_coin (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointCoin *ppc)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1928,18 +1892,14 @@ postgres_get_auditor_progress_coin (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_wire_auditor_account_progress (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const char *account_name,
- const struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t in_wire_off,
- uint64_t out_wire_off)
+postgres_insert_wire_auditor_account_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t in_wire_off,
+ uint64_t out_wire_off)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -1972,18 +1932,14 @@ postgres_insert_wire_auditor_account_progress (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_wire_auditor_account_progress (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const char *account_name,
- const struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t in_wire_off,
- uint64_t out_wire_off)
+postgres_update_wire_auditor_account_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t in_wire_off,
+ uint64_t out_wire_off)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_uint64 (&pp->last_reserve_in_serial_id),
@@ -2015,17 +1971,14 @@ postgres_update_wire_auditor_account_progress (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_wire_auditor_account_progress (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const char *account_name,
- struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t *in_wire_off,
- uint64_t *out_wire_off)
+postgres_get_wire_auditor_account_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t *in_wire_off,
+ uint64_t *out_wire_off)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2063,12 +2016,11 @@ postgres_get_wire_auditor_account_progress (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_wire_auditor_progress (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_WireProgressPoint *pp)
+postgres_insert_wire_auditor_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_WireProgressPoint *pp)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2095,12 +2047,11 @@ postgres_insert_wire_auditor_progress (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_wire_auditor_progress (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_WireProgressPoint *pp)
+postgres_update_wire_auditor_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_WireProgressPoint *pp)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_absolute_time (&pp->last_timestamp),
@@ -2126,11 +2077,11 @@ postgres_update_wire_auditor_progress (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_wire_auditor_progress (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct TALER_AUDITORDB_WireProgressPoint *pp)
+postgres_get_wire_auditor_progress (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_WireProgressPoint *pp)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2331,13 +2282,12 @@ postgres_get_reserve_info (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_reserve_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *reserve_balance,
- const struct
- TALER_Amount *withdraw_fee_balance)
+postgres_insert_reserve_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *reserve_balance,
+ const struct TALER_Amount *withdraw_fee_balance)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2370,13 +2320,12 @@ postgres_insert_reserve_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_reserve_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *reserve_balance,
- const struct
- TALER_Amount *withdraw_fee_balance)
+postgres_update_reserve_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *reserve_balance,
+ const struct TALER_Amount *withdraw_fee_balance)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (reserve_balance),
@@ -2441,11 +2390,11 @@ postgres_get_reserve_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_wire_fee_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *wire_fee_balance)
+postgres_insert_wire_fee_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *wire_fee_balance)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2471,11 +2420,11 @@ postgres_insert_wire_fee_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_wire_fee_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *wire_fee_balance)
+postgres_update_wire_fee_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *wire_fee_balance)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (wire_fee_balance),
@@ -2539,15 +2488,15 @@ postgres_get_wire_fee_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_denomination_balance (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- const struct TALER_Amount *denom_balance,
- const struct TALER_Amount *denom_loss,
- const struct TALER_Amount *denom_risk,
- const struct TALER_Amount *recoup_loss,
- uint64_t num_issued)
+postgres_insert_denomination_balance (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ const struct TALER_Amount *denom_balance,
+ const struct TALER_Amount *denom_loss,
+ const struct TALER_Amount *denom_risk,
+ const struct TALER_Amount *recoup_loss,
+ uint64_t num_issued)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
@@ -2581,15 +2530,15 @@ postgres_insert_denomination_balance (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_denomination_balance (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- const struct TALER_Amount *denom_balance,
- const struct TALER_Amount *denom_loss,
- const struct TALER_Amount *denom_risk,
- const struct TALER_Amount *recoup_loss,
- uint64_t num_issued)
+postgres_update_denomination_balance (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ const struct TALER_Amount *denom_balance,
+ const struct TALER_Amount *denom_loss,
+ const struct TALER_Amount *denom_risk,
+ const struct TALER_Amount *recoup_loss,
+ uint64_t num_issued)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (denom_balance),
@@ -2670,17 +2619,17 @@ postgres_get_denomination_balance (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_balance_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *denom_balance,
- const struct TALER_Amount *deposit_fee_balance,
- const struct TALER_Amount *melt_fee_balance,
- const struct TALER_Amount *refund_fee_balance,
- const struct TALER_Amount *risk,
- const struct TALER_Amount *loss,
- const struct TALER_Amount *irregular_recoup)
+postgres_insert_balance_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *denom_balance,
+ const struct TALER_Amount *deposit_fee_balance,
+ const struct TALER_Amount *melt_fee_balance,
+ const struct TALER_Amount *refund_fee_balance,
+ const struct TALER_Amount *risk,
+ const struct TALER_Amount *loss,
+ const struct TALER_Amount *irregular_recoup)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2729,17 +2678,17 @@ postgres_insert_balance_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_balance_summary (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *denom_balance,
- const struct TALER_Amount *deposit_fee_balance,
- const struct TALER_Amount *melt_fee_balance,
- const struct TALER_Amount *refund_fee_balance,
- const struct TALER_Amount *risk,
- const struct TALER_Amount *loss,
- const struct TALER_Amount *irregular_recoup)
+postgres_update_balance_summary (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *denom_balance,
+ const struct TALER_Amount *deposit_fee_balance,
+ const struct TALER_Amount *melt_fee_balance,
+ const struct TALER_Amount *refund_fee_balance,
+ const struct TALER_Amount *risk,
+ const struct TALER_Amount *loss,
+ const struct TALER_Amount *irregular_recoup)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (denom_balance),
@@ -2826,17 +2775,14 @@ postgres_get_balance_summary (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_historic_denom_revenue (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- struct GNUNET_TIME_Absolute
- revenue_timestamp,
- const struct
- TALER_Amount *revenue_balance,
- const struct TALER_Amount *loss_balance)
+postgres_insert_historic_denom_revenue (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct GNUNET_TIME_Absolute revenue_timestamp,
+ const struct TALER_Amount *revenue_balance,
+ const struct TALER_Amount *loss_balance)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -2947,13 +2893,12 @@ historic_denom_revenue_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_historic_denom_revenue (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_AUDITORDB_HistoricDenominationRevenueDataCallback
- cb,
- void *cb_cls)
+postgres_select_historic_denom_revenue (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -2990,16 +2935,13 @@ postgres_select_historic_denom_revenue (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_historic_reserve_revenue (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct GNUNET_TIME_Absolute
- start_time,
- struct GNUNET_TIME_Absolute end_time,
- const struct
- TALER_Amount *reserve_profits)
+postgres_insert_historic_reserve_revenue (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Absolute start_time,
+ struct GNUNET_TIME_Absolute end_time,
+ const struct TALER_Amount *reserve_profits)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -3103,14 +3045,12 @@ historic_reserve_revenue_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_historic_reserve_revenue (void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_AUDITORDB_HistoricReserveRevenueDataCallback
- cb,
- void *cb_cls)
+postgres_select_historic_reserve_revenue (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -3146,11 +3086,11 @@ postgres_select_historic_reserve_revenue (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_predicted_result (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *balance)
+postgres_insert_predicted_result (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *balance)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (master_pub),
@@ -3176,11 +3116,11 @@ postgres_insert_predicted_result (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_update_predicted_result (void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct TALER_Amount *balance)
+postgres_update_predicted_result (
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_Amount *balance)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_amount (balance),
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c
index 4208f442a..6c92241dd 100644
--- a/src/bank-lib/bank_api_admin.c
+++ b/src/bank-lib/bank_api_admin.c
@@ -172,14 +172,14 @@ handle_admin_add_incoming_finished (void *cls,
* In this case, the callback is not called.
*/
struct TALER_BANK_AdminAddIncomingHandle *
-TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
- const struct TALER_BANK_AuthenticationData *auth,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *amount,
- const char *debit_account,
- TALER_BANK_AdminAddIncomingCallback res_cb,
- void *res_cb_cls)
+TALER_BANK_admin_add_incoming (
+ struct GNUNET_CURL_Context *ctx,
+ const struct TALER_BANK_AuthenticationData *auth,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *amount,
+ const char *debit_account,
+ TALER_BANK_AdminAddIncomingCallback res_cb,
+ void *res_cb_cls)
{
struct TALER_BANK_AdminAddIncomingHandle *aai;
json_t *admin_obj;
@@ -257,8 +257,8 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
* @param aai the admin add incoming request handle
*/
void
-TALER_BANK_admin_add_incoming_cancel (struct
- TALER_BANK_AdminAddIncomingHandle *aai)
+TALER_BANK_admin_add_incoming_cancel (
+ struct TALER_BANK_AdminAddIncomingHandle *aai)
{
if (NULL != aai->job)
{
diff --git a/src/bank-lib/bank_api_transfer.c b/src/bank-lib/bank_api_transfer.c
index 3ff40eace..45bbb46ee 100644
--- a/src/bank-lib/bank_api_transfer.c
+++ b/src/bank-lib/bank_api_transfer.c
@@ -78,13 +78,13 @@ GNUNET_NETWORK_STRUCT_END
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
*/
void
-TALER_BANK_prepare_transfer (const char *destination_account_payto_uri,
- const struct TALER_Amount *amount,
- const char *exchange_base_url,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- void **buf,
- size_t *buf_size)
+TALER_BANK_prepare_transfer (
+ const char *destination_account_payto_uri,
+ const struct TALER_Amount *amount,
+ const char *exchange_base_url,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ void **buf,
+ size_t *buf_size)
{
struct WirePackP *wp;
size_t d_len = strlen (destination_account_payto_uri) + 1;
@@ -259,13 +259,13 @@ handle_transfer_finished (void *cls,
* @return NULL on error
*/
struct TALER_BANK_TransferHandle *
-TALER_BANK_transfer (struct GNUNET_CURL_Context *ctx,
- const struct
- TALER_BANK_AuthenticationData *auth,
- const void *buf,
- size_t buf_size,
- TALER_BANK_TransferCallback cc,
- void *cc_cls)
+TALER_BANK_transfer (
+ struct GNUNET_CURL_Context *ctx,
+ const struct TALER_BANK_AuthenticationData *auth,
+ const void *buf,
+ size_t buf_size,
+ TALER_BANK_TransferCallback cc,
+ void *cc_cls)
{
struct TALER_BANK_TransferHandle *th;
json_t *transfer_obj;
@@ -376,8 +376,7 @@ TALER_BANK_transfer (struct GNUNET_CURL_Context *ctx,
* @param th the wire transfer request handle
*/
void
-TALER_BANK_transfer_cancel (struct
- TALER_BANK_TransferHandle *th)
+TALER_BANK_transfer_cancel (struct TALER_BANK_TransferHandle *th)
{
if (NULL != th->job)
{
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index dfe3ada89..dd8d3341c 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -348,15 +348,15 @@ TALER_FAKEBANK_check_credit (struct TALER_FAKEBANK_Handle *h,
* #GNUNET_SYSERR if the request_uid was reused for a different transfer
*/
int
-TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
- const char *debit_account,
- const char *credit_account,
- const struct TALER_Amount *amount,
- const struct
- TALER_WireTransferIdentifierRawP *subject,
- const char *exchange_base_url,
- const struct GNUNET_HashCode *request_uid,
- uint64_t *ret_row_id)
+TALER_FAKEBANK_make_transfer (
+ struct TALER_FAKEBANK_Handle *h,
+ const char *debit_account,
+ const char *credit_account,
+ const struct TALER_Amount *amount,
+ const struct TALER_WireTransferIdentifierRawP *subject,
+ const char *exchange_base_url,
+ const struct GNUNET_HashCode *request_uid,
+ uint64_t *ret_row_id)
{
struct Transaction *t;
@@ -433,12 +433,12 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
* @return serial_id of the transfer
*/
uint64_t
-TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h,
- const char *debit_account,
- const char *credit_account,
- const struct TALER_Amount *amount,
- const struct
- TALER_ReservePublicKeyP *reserve_pub)
+TALER_FAKEBANK_make_admin_transfer (
+ struct TALER_FAKEBANK_Handle *h,
+ const char *debit_account,
+ const char *credit_account,
+ const struct TALER_Amount *amount,
+ const struct TALER_ReservePublicKeyP *reserve_pub)
{
struct Transaction *t;
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c
index 0081c3283..2943adb24 100644
--- a/src/exchangedb/exchangedb_accounts.c
+++ b/src/exchangedb/exchangedb_accounts.c
@@ -45,12 +45,12 @@ struct FindAccountContext
/**
- * Check if @a section begins with "exchange-wire-", and if
- * so if the "ENABLE" option is set to "YES". If both are
- * true, call the callback from the context with the
- * rest of the section name.
+ * Check if @a section begins with "exchange-account-", and if so if the
+ * "PAYTO_URI" is given. If not, a warning is printed, otherwise we also check
+ * if "ENABLE_CREDIT" or "ENABLE_DEBIT" options are set to "YES" and then call
+ * the callback in @a cls with all of the information gathered.
*
- * @param cls our `struct FindEnabledWireContext`
+ * @param cls our `struct FindAccountContext`
* @param section name of a section in the configuration
*/
static void
diff --git a/src/exchangedb/exchangedb_auditorkeys.c b/src/exchangedb/exchangedb_auditorkeys.c
index fabd5278f..4adf89811 100644
--- a/src/exchangedb/exchangedb_auditorkeys.c
+++ b/src/exchangedb/exchangedb_auditorkeys.c
@@ -97,24 +97,34 @@ auditor_iter (void *cls,
const struct TALER_AuditorSignatureP *sigs;
const struct TALER_DenominationKeyValidityPS *dki;
const char *auditor_url;
- unsigned int dki_len;
+ uint32_t dki_len;
size_t url_len;
int iret;
- if (GNUNET_OK != GNUNET_DISK_file_size (filename,
- &size,
- GNUNET_YES,
- GNUNET_YES))
+ if (GNUNET_OK !=
+ GNUNET_DISK_file_size (filename,
+ &size,
+ GNUNET_YES,
+ GNUNET_YES))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Skipping inaccessable auditor information file `%s'\n",
filename);
return GNUNET_OK;
}
if (size < sizeof (struct AuditorFileHeaderP))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Unrecognized size for file `%s', skipping\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "File size (%llu bytes) too small for file `%s' to contain auditor data. Skipping it.\n",
+ (unsigned long long) size,
+ filename);
+ return GNUNET_OK;
+ }
+ if (size >= GNUNET_MAX_MALLOC_CHECKED)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "File size (%llu bytes) too large for file `%s' to contain auditor data. Skipping it.\n",
+ (unsigned long long) size,
filename);
return GNUNET_OK;
}
@@ -140,35 +150,33 @@ auditor_iter (void *cls,
GNUNET_free (af);
return GNUNET_OK;
}
- if ( (size - sizeof (struct AuditorFileHeaderP)) / dki_len <
+ size -= sizeof (struct AuditorFileHeaderP);
+ if ( (size / dki_len) <=
(sizeof (struct TALER_DenominationKeyValidityPS)
+ sizeof (struct TALER_AuditorSignatureP)) )
{
GNUNET_break_op (0);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Malformed key file %s\n",
- filename);
+ "Malformed auditor data file %s (file too short for %u keys)\n",
+ filename,
+ (unsigned int) dki_len);
GNUNET_free (af);
return GNUNET_OK;
}
- url_len = size
- - sizeof (struct AuditorFileHeaderP)
- - dki_len * (sizeof (struct TALER_DenominationKeyValidityPS)
- + sizeof (struct TALER_AuditorSignatureP));
+ url_len = size - dki_len * (sizeof (struct TALER_DenominationKeyValidityPS)
+ + sizeof (struct TALER_AuditorSignatureP));
sigs = (const struct TALER_AuditorSignatureP *) &af[1];
dki = (const struct TALER_DenominationKeyValidityPS *) &sigs[dki_len];
auditor_url = (const char *) &dki[dki_len];
- if ( (0 == url_len) ||
- ('\0' != auditor_url[url_len - 1]) )
+ if ('\0' != auditor_url[url_len - 1])
{
GNUNET_break_op (0);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Malformed key file %s\n",
+ "Malformed auditor data file %s (no 0-terminator)\n",
filename);
GNUNET_free (af);
return GNUNET_OK;
}
- /* Ignoring return value to not interrupt the iteration */
if (GNUNET_OK !=
(iret = aic->it (aic->it_cls,
&af->apub,
@@ -242,64 +250,93 @@ TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_auditor_write (const char *filename,
- const struct TALER_AuditorPublicKeyP *apub,
- const char *auditor_url,
- const struct TALER_AuditorSignatureP *asigs,
- const struct TALER_MasterPublicKeyP *mpub,
- unsigned int dki_len,
- const struct
- TALER_DenominationKeyValidityPS *dki)
+TALER_EXCHANGEDB_auditor_write (
+ const char *filename,
+ const struct TALER_AuditorPublicKeyP *apub,
+ const char *auditor_url,
+ const struct TALER_AuditorSignatureP *asigs,
+ const struct TALER_MasterPublicKeyP *mpub,
+ uint32_t dki_len,
+ const struct TALER_DenominationKeyValidityPS *dki)
{
- struct AuditorFileHeaderP af;
struct GNUNET_DISK_FileHandle *fh;
ssize_t wrote;
size_t wsize;
- int ret;
int eno;
- af.apub = *apub;
- af.mpub = *mpub;
- af.dki_len = htonl ((uint32_t) dki_len);
- ret = GNUNET_SYSERR;
+ if (GNUNET_OK !=
+ GNUNET_DISK_directory_create_for_file (filename))
+ {
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "mkdir (for file)",
+ filename);
+ errno = eno;
+ return GNUNET_SYSERR;
+ }
if (NULL == (fh = GNUNET_DISK_file_open
(filename,
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
| GNUNET_DISK_OPEN_TRUNCATE,
GNUNET_DISK_PERM_USER_READ
| GNUNET_DISK_PERM_USER_WRITE)))
- goto cleanup;
- wsize = sizeof (struct AuditorFileHeaderP);
- if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
- &af,
- wsize)))
- goto cleanup;
- if (wrote != (ssize_t) wsize)
- goto cleanup;
+ {
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "open",
+ filename);
+ errno = eno;
+ return GNUNET_SYSERR;
+ }
+ {
+ struct AuditorFileHeaderP af = {
+ .apub = *apub,
+ .mpub = *mpub,
+ .dki_len = htonl (dki_len)
+ };
+
+ wsize = sizeof (struct AuditorFileHeaderP);
+ if ( (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
+ &af,
+ wsize))) ||
+ (wrote != (ssize_t) wsize) )
+ goto cleanup;
+ }
wsize = dki_len * sizeof (struct TALER_AuditorSignatureP);
- if (((ssize_t) wsize) ==
+ if (((ssize_t) wsize) !=
GNUNET_DISK_file_write (fh,
asigs,
wsize))
- ret = GNUNET_OK;
+ goto cleanup;
wsize = dki_len * sizeof (struct TALER_DenominationKeyValidityPS);
- if (((ssize_t) wsize) ==
+ if (((ssize_t) wsize) !=
GNUNET_DISK_file_write (fh,
dki,
wsize))
- ret = GNUNET_OK;
+ goto cleanup;
wsize = strlen (auditor_url) + 1;
- if (((ssize_t) wsize) ==
+ if (((ssize_t) wsize) !=
GNUNET_DISK_file_write (fh,
auditor_url,
wsize))
- ret = GNUNET_OK;
+ goto cleanup;
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_DISK_file_close (fh));
+ return GNUNET_OK;
cleanup:
eno = errno;
- if (NULL != fh)
- (void) GNUNET_DISK_file_close (fh);
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "write",
+ filename);
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_DISK_file_close (fh));
+ /* try to remove the file, as it must be malformed */
+ if (0 != unlink (filename))
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "unlink",
+ filename);
errno = eno;
- return ret;
+ return GNUNET_SYSERR;
}
diff --git a/src/exchangedb/exchangedb_denomkeys.c b/src/exchangedb/exchangedb_denomkeys.c
index 01b04198f..03daab300 100644
--- a/src/exchangedb/exchangedb_denomkeys.c
+++ b/src/exchangedb/exchangedb_denomkeys.c
@@ -58,39 +58,42 @@ GNUNET_NETWORK_STRUCT_END
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
- const struct
- GNUNET_HashCode *denom_hash,
- const struct
- TALER_MasterPrivateKeyP *mpriv)
+TALER_EXCHANGEDB_denomination_key_revoke (
+ const char *revocation_dir,
+ const struct GNUNET_HashCode *denom_hash,
+ const struct TALER_MasterPrivateKeyP *mpriv)
{
- struct TALER_MasterDenominationKeyRevocationPS rm;
char *fn;
int ret;
struct RevocationFileP rd;
+ {
+ struct TALER_MasterDenominationKeyRevocationPS rm = {
+ .purpose.purpose = htonl (
+ TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED),
+ .purpose.size = htonl (sizeof (rm)),
+ .h_denom_pub = *denom_hash
+ };
+
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_CRYPTO_eddsa_sign (&mpriv->eddsa_priv,
+ &rm.purpose,
+ &rd.msig.eddsa_signature));
+ }
GNUNET_asprintf (&fn,
"%s" DIR_SEPARATOR_STR
"%s.rev",
revocation_dir,
GNUNET_h2s_full (denom_hash));
- rm.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED);
- rm.purpose.size = htonl (sizeof (rm));
- rm.h_denom_pub = *denom_hash;
- GNUNET_assert (GNUNET_OK ==
- GNUNET_CRYPTO_eddsa_sign (&mpriv->eddsa_priv,
- &rm.purpose,
- &rd.msig.eddsa_signature));
rd.denom_hash = *denom_hash;
- if (sizeof (rd) !=
- GNUNET_DISK_fn_write (fn,
- &rd,
- sizeof (rd),
- GNUNET_DISK_PERM_USER_READ
- | GNUNET_DISK_PERM_USER_WRITE))
- ret = GNUNET_SYSERR;
- else
- ret = GNUNET_OK;
+ ret = (sizeof (rd) !=
+ GNUNET_DISK_fn_write (fn,
+ &rd,
+ sizeof (rd),
+ GNUNET_DISK_PERM_USER_READ
+ | GNUNET_DISK_PERM_USER_WRITE))
+ ? GNUNET_SYSERR
+ : GNUNET_OK;
GNUNET_free (fn);
return ret;
}
@@ -105,10 +108,9 @@ TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
* #GNUNET_SYSERR upon failure
*/
int
-TALER_EXCHANGEDB_denomination_key_read (const char *filename,
- struct
- TALER_EXCHANGEDB_DenominationKey
- *dki)
+TALER_EXCHANGEDB_denomination_key_read (
+ const char *filename,
+ struct TALER_EXCHANGEDB_DenominationKey *dki)
{
uint64_t size;
size_t offset;
@@ -129,9 +131,20 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
offset = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
if (size <= offset)
{
- GNUNET_break (0);
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "File size (%llu bytes) too small for file `%s' to contain denomination key data. Skipping it.\n",
+ (unsigned long long) size,
+ filename);
return GNUNET_SYSERR;
}
+ if (size >= GNUNET_MAX_MALLOC_CHECKED)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "File size (%llu bytes) too large for file `%s' to contain denomination key data. Skipping it.\n",
+ (unsigned long long) size,
+ filename);
+ return GNUNET_OK;
+ }
data = GNUNET_malloc (size);
if (((ssize_t) size) !=
GNUNET_DISK_fn_read (filename,
@@ -160,16 +173,19 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
offset);
GNUNET_free (data);
if (0 == GNUNET_TIME_absolute_get_remaining
- (GNUNET_TIME_absolute_ntoh (
- dki->issue.properties.expire_withdraw)).rel_value_us)
+ (GNUNET_TIME_absolute_ntoh
+ (dki->issue.properties.expire_withdraw)).rel_value_us)
{
+ /* key expired for withdrawal, remove private key to
+ minimize chance of compromise */
if (0 != unlink (filename))
{
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
"unlink",
filename);
- return GNUNET_OK; /* yes, we had an error, but the file content
- was fine and is being returned */
+ /* yes, we had an error, but the file content
+ was fine and is being returned */
+ return GNUNET_OK;
}
}
return GNUNET_OK;
@@ -184,26 +200,25 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_denomination_key_write (const char *filename,
- const struct
- TALER_EXCHANGEDB_DenominationKey
- *dki)
+TALER_EXCHANGEDB_denomination_key_write (
+ const char *filename,
+ const struct TALER_EXCHANGEDB_DenominationKey *dki)
{
- char *priv_enc;
- size_t priv_enc_size;
struct GNUNET_DISK_FileHandle *fh;
ssize_t wrote;
size_t wsize;
- int ret;
+ int eno;
- fh = NULL;
- priv_enc_size
- = GNUNET_CRYPTO_rsa_private_key_encode (dki->denom_priv.rsa_private_key,
- &priv_enc);
- ret = GNUNET_SYSERR;
if (GNUNET_OK !=
GNUNET_DISK_directory_create_for_file (filename))
+ {
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "mkdir (for file)",
+ filename);
+ errno = eno;
return GNUNET_SYSERR;
+ }
if (NULL == (fh = GNUNET_DISK_file_open
(filename,
GNUNET_DISK_OPEN_WRITE | GNUNET_DISK_OPEN_CREATE
@@ -211,27 +226,53 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
| GNUNET_DISK_OPEN_FAILIFEXISTS,
GNUNET_DISK_PERM_USER_READ
| GNUNET_DISK_PERM_USER_WRITE)))
- goto cleanup;
+ {
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "open",
+ filename);
+ errno = eno;
+ return GNUNET_SYSERR;
+ }
wsize = sizeof (struct TALER_EXCHANGEDB_DenominationKeyInformationP);
- if (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
- &dki->issue,
- wsize)))
- goto cleanup;
- if (wrote != (ssize_t) wsize)
- goto cleanup;
- if (GNUNET_SYSERR ==
- (wrote = GNUNET_DISK_file_write (fh,
- priv_enc,
- priv_enc_size)))
+ if ( (GNUNET_SYSERR == (wrote = GNUNET_DISK_file_write (fh,
+ &dki->issue,
+ wsize))) ||
+ (wrote != (ssize_t) wsize) )
goto cleanup;
- if (wrote != (ssize_t) priv_enc_size)
- goto cleanup;
- ret = GNUNET_OK;
+ {
+ char *priv_enc;
+ size_t priv_enc_size;
+
+ priv_enc_size
+ = GNUNET_CRYPTO_rsa_private_key_encode (dki->denom_priv.rsa_private_key,
+ &priv_enc);
+ wrote = GNUNET_DISK_file_write (fh,
+ priv_enc,
+ priv_enc_size);
+ GNUNET_free (priv_enc);
+ if ( (GNUNET_SYSERR == wrote) ||
+ (wrote != (ssize_t) priv_enc_size) )
+ goto cleanup;
+ }
+ GNUNET_assert (GNUNET_OK ==
+ GNUNET_DISK_file_close (fh));
+ return GNUNET_OK;
+
cleanup:
- GNUNET_free_non_null (priv_enc);
- if (NULL != fh)
- (void) GNUNET_DISK_file_close (fh);
- return ret;
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "write",
+ filename);
+ GNUNET_break (GNUNET_OK ==
+ GNUNET_DISK_file_close (fh));
+ /* try to remove the file, as it must be malformed */
+ if (0 != unlink (filename))
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "unlink",
+ filename);
+ errno = eno;
+ return GNUNET_SYSERR;
}
@@ -337,21 +378,22 @@ denomkeys_iterate_topdir_iter (void *cls,
* as maybe none of the files were well-formed)
*/
int
-TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
- TALER_EXCHANGEDB_DenominationKeyIterator
- it,
- void *it_cls)
+TALER_EXCHANGEDB_denomination_keys_iterate (
+ const char *exchange_base_dir,
+ TALER_EXCHANGEDB_DenominationKeyIterator it,
+ void *it_cls)
{
+ struct DenomkeysIterateContext dic = {
+ .it = it,
+ .it_cls = it_cls
+ };
char *dir;
- struct DenomkeysIterateContext dic;
int ret;
GNUNET_asprintf (&dir,
"%s" DIR_SEPARATOR_STR
TALER_EXCHANGEDB_DIR_DENOMINATION_KEYS,
exchange_base_dir);
- dic.it = it;
- dic.it_cls = it_cls;
ret = GNUNET_DISK_directory_scan (dir,
&denomkeys_iterate_topdir_iter,
&dic);
@@ -401,42 +443,57 @@ revocations_iterate_cb (void *cls,
{
struct RevocationsIterateContext *ric = cls;
struct RevocationFileP rf;
- struct TALER_MasterDenominationKeyRevocationPS rm;
+ ssize_t rd;
/* Check if revocation is valid... */
- if (sizeof (rf) !=
- GNUNET_DISK_fn_read (filename,
- &rf,
- sizeof (rf)))
+ rd = GNUNET_DISK_fn_read (filename,
+ &rf,
+ sizeof (rf));
+ if (GNUNET_SYSERR == rd)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _ (
- "Invalid revocation file `%s' found and ignored (bad size)\n"),
- filename);
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
+ "read",
+ filename);
return GNUNET_OK;
}
- rm.purpose.purpose = htonl (TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED);
- rm.purpose.size = htonl (sizeof (rm));
- rm.h_denom_pub = rf.denom_hash;
- if (GNUNET_OK !=
- GNUNET_CRYPTO_eddsa_verify (
- TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED,
- &rm.purpose,
- &rf.msig.eddsa_signature,
- &ric->master_pub->eddsa_pub))
+ if (sizeof (rf) != (size_t) rd)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _ (
- "Invalid revocation file `%s' found and ignored (bad signature)\n"),
- filename);
+ "Invalid revocation file `%s' found and ignored (bad size: %llu)\n",
+ filename,
+ (unsigned long long) rd);
return GNUNET_OK;
}
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Denomination key `%s' was revoked!\n",
- GNUNET_h2s (&rm.h_denom_pub));
- return ric->it (ric->it_cls,
- &rm.h_denom_pub,
- &rf.msig);
+
+ {
+ struct TALER_MasterDenominationKeyRevocationPS rm = {
+ .purpose.purpose = htonl (
+ TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED),
+ .purpose.size = htonl (sizeof (rm)),
+ .h_denom_pub = rf.denom_hash
+ };
+
+ if (GNUNET_OK !=
+ GNUNET_CRYPTO_eddsa_verify (
+ TALER_SIGNATURE_MASTER_DENOMINATION_KEY_REVOKED,
+ &rm.purpose,
+ &rf.msig.eddsa_signature,
+ &ric->master_pub->eddsa_pub))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _ (
+ "Invalid revocation file `%s' found and ignored (bad signature)\n"),
+ filename);
+ return GNUNET_OK;
+ }
+
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Denomination key `%s' was revoked!\n",
+ GNUNET_h2s (&rm.h_denom_pub));
+ return ric->it (ric->it_cls,
+ &rm.h_denom_pub,
+ &rf.msig);
+ }
}
@@ -467,8 +524,11 @@ TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
if (GNUNET_OK !=
GNUNET_DISK_directory_create (revocation_dir))
- return 0; /* directory doesn't exist and we couldn't even create it,
- clearly means there are no revocations there */
+ {
+ /* directory doesn't exist and we couldn't even create it,
+ clearly means there are no revocations there */
+ return 0;
+ }
return GNUNET_DISK_directory_scan (revocation_dir,
&revocations_iterate_cb,
&ric);
diff --git a/src/exchangedb/exchangedb_plugin.c b/src/exchangedb/exchangedb_plugin.c
index f4c2eea99..21bb032f3 100644
--- a/src/exchangedb/exchangedb_plugin.c
+++ b/src/exchangedb/exchangedb_plugin.c
@@ -48,9 +48,9 @@ TALER_EXCHANGEDB_plugin_load (const struct GNUNET_CONFIGURATION_Handle *cfg)
"db");
return NULL;
}
- (void) GNUNET_asprintf (&lib_name,
- "libtaler_plugin_exchangedb_%s",
- plugin_name);
+ GNUNET_asprintf (&lib_name,
+ "libtaler_plugin_exchangedb_%s",
+ plugin_name);
GNUNET_free (plugin_name);
plugin = GNUNET_PLUGIN_load (lib_name,
(void *) cfg);
diff --git a/src/exchangedb/exchangedb_signkeys.c b/src/exchangedb/exchangedb_signkeys.c
index 71ebb5526..beafa1dda 100644
--- a/src/exchangedb/exchangedb_signkeys.c
+++ b/src/exchangedb/exchangedb_signkeys.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014, 2015, 2016 Taler Systems SA
+ Copyright (C) 2014, 2015, 2016, 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
@@ -112,15 +112,16 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
TALER_EXCHANGEDB_SigningKeyIterator it,
void *it_cls)
{
+ struct SignkeysIterateContext skc = {
+ .it = it,
+ .it_cls = it_cls
+ };
char *signkey_dir;
- struct SignkeysIterateContext skc;
int ret;
GNUNET_asprintf (&signkey_dir,
"%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS,
exchange_base_dir);
- skc.it = it;
- skc.it_cls = it_cls;
ret = GNUNET_DISK_directory_scan (signkey_dir,
&signkeys_iterate_dir_iter,
&skc);
@@ -130,30 +131,6 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
/**
- * Obtain the name of the directory we use to store signing
- * keys created at time @a start.
- *
- * @param exchange_directory base director where we store key material
- * @param start time at which we create the signing key
- * @return name of the directory we should use, basically "$EXCHANGEDIR/$TIME/";
- * (valid until next call to this function)
- */
-static char *
-get_signkey_file (const char *exchange_directory,
- struct GNUNET_TIME_Absolute start)
-{
- char *fn;
-
- GNUNET_asprintf (&fn,
- "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS
- DIR_SEPARATOR_STR "%llu",
- exchange_directory,
- (unsigned long long) start.abs_value_us);
- return fn;
-}
-
-
-/**
* Exports a signing key to the given file.
*
* @param exchange_base_dir base directory for the keys
@@ -171,18 +148,31 @@ TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
char *skf;
ssize_t nwrite;
- skf = get_signkey_file (exchange_base_dir,
- start);
+ GNUNET_asprintf (&skf,
+ "%s" DIR_SEPARATOR_STR TALER_EXCHANGEDB_DIR_SIGNING_KEYS
+ DIR_SEPARATOR_STR "%llu",
+ exchange_base_dir,
+ (unsigned long long) start.abs_value_us);
if (GNUNET_OK !=
GNUNET_DISK_directory_create_for_file (skf))
+ {
+ int eno;
+
+ eno = errno;
+ GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
+ "mkdir (for file)",
+ skf);
+ errno = eno;
return GNUNET_SYSERR;
+ }
nwrite = GNUNET_DISK_fn_write (skf,
ski,
sizeof (struct
TALER_EXCHANGEDB_PrivateSigningKeyInformationP),
GNUNET_DISK_PERM_USER_WRITE
| GNUNET_DISK_PERM_USER_READ);
- if (sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP) != nwrite)
+ if (sizeof (struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP) !=
+ (size_t) nwrite)
{
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR,
"write",
diff --git a/src/exchangedb/exchangedb_transactions.c b/src/exchangedb/exchangedb_transactions.c
index 79acdb4a0..8c14de6c1 100644
--- a/src/exchangedb/exchangedb_transactions.c
+++ b/src/exchangedb/exchangedb_transactions.c
@@ -33,12 +33,10 @@
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
*/
int
-TALER_EXCHANGEDB_calculate_transaction_list_totals (struct
- TALER_EXCHANGEDB_TransactionList
- *tl,
- const struct
- TALER_Amount *off,
- struct TALER_Amount *ret)
+TALER_EXCHANGEDB_calculate_transaction_list_totals (
+ struct TALER_EXCHANGEDB_TransactionList *tl,
+ const struct TALER_Amount *off,
+ struct TALER_Amount *ret)
{
struct TALER_Amount spent = *off;
struct TALER_Amount refunded;
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c
index 848fe932c..dfa05fb8c 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -1570,13 +1570,11 @@ postgres_preflight (void *cls,
* @return status of the query
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_denomination_info (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_EXCHANGEDB_DenominationKeyInformationP
- *issue)
+postgres_insert_denomination_info (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&issue->properties.denom_hash),
@@ -1626,12 +1624,11 @@ postgres_insert_denomination_info (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_denomination_info (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *denom_pub_hash,
- struct
- TALER_EXCHANGEDB_DenominationKeyInformationP *
- issue)
+postgres_get_denomination_info (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue)
{
struct PostgresClosure *pg = cls;
enum GNUNET_DB_QueryStatus qs;
@@ -2015,11 +2012,11 @@ postgres_reserves_in_insert (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_latest_reserve_in_reference (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- const char *exchange_account_name,
- uint64_t *wire_reference)
+postgres_get_latest_reserve_in_reference (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *exchange_account_name,
+ uint64_t *wire_reference)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_string (exchange_account_name),
@@ -2052,11 +2049,11 @@ postgres_get_latest_reserve_in_reference (void *cls,
* @return statement execution status
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_withdraw_info (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_blind,
- struct TALER_EXCHANGEDB_CollectableBlindcoin *
- collectable)
+postgres_get_withdraw_info (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *h_blind,
+ struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam no_params[] = {
@@ -2106,11 +2103,10 @@ postgres_get_withdraw_info (void *cls,
* @return query execution status
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_withdraw_info (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_EXCHANGEDB_CollectableBlindcoin *
- collectable)
+postgres_insert_withdraw_info (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_EXCHANGEDB_CollectableBlindcoin *collectable)
{
struct PostgresClosure *pg = cls;
struct TALER_EXCHANGEDB_Reserve reserve;
@@ -2949,14 +2945,14 @@ match_deposit_cb (void *cls,
* number of rows processed, 0 if none exist
*/
static enum GNUNET_DB_QueryStatus
-postgres_iterate_matching_deposits (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_wire,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- TALER_EXCHANGEDB_DepositIterator deposit_cb,
- void *deposit_cb_cls,
- uint32_t limit)
+postgres_iterate_matching_deposits (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ TALER_EXCHANGEDB_DepositIterator deposit_cb,
+ void *deposit_cb_cls,
+ uint32_t limit)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -3040,11 +3036,11 @@ postgres_get_known_coin (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_coin_denomination (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- struct GNUNET_HashCode *denom_hash)
+postgres_get_coin_denomination (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct GNUNET_HashCode *denom_hash)
{
struct PostgresClosure *pc = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -3347,16 +3343,14 @@ get_refunds_cb (void *cls,
* @return query result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_refunds_by_coin (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- const struct GNUNET_HashCode *h_contract,
- TALER_EXCHANGEDB_RefundCoinCallback
- cb,
- void *cb_cls)
+postgres_select_refunds_by_coin (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct GNUNET_HashCode *h_contract,
+ TALER_EXCHANGEDB_RefundCoinCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
enum GNUNET_DB_QueryStatus qs;
@@ -3481,10 +3475,10 @@ postgres_get_melt_index (void *cls,
* @return query status for the transaction
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_melt (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_EXCHANGEDB_Refresh *refresh_session)
+postgres_insert_melt (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_EXCHANGEDB_Refresh *refresh_session)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&refresh_session->rc),
@@ -3518,15 +3512,15 @@ postgres_insert_melt (void *cls,
* @return query status for the transaction
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_refresh_reveal (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_RefreshCommitmentP *rc,
- uint32_t num_rrcs,
- const struct
- TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
- unsigned int num_tprivs,
- const struct TALER_TransferPrivateKeyP *tprivs,
- const struct TALER_TransferPublicKeyP *tp)
+postgres_insert_refresh_reveal (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_RefreshCommitmentP *rc,
+ uint32_t num_rrcs,
+ const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
+ unsigned int num_tprivs,
+ const struct TALER_TransferPrivateKeyP *tprivs,
+ const struct TALER_TransferPublicKeyP *tp)
{
(void) cls;
if (TALER_CNC_KAPPA != num_tprivs + 1)
@@ -4415,12 +4409,12 @@ struct Work
* @return database transaction status
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_coin_transactions (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- int include_recoup,
- struct TALER_EXCHANGEDB_TransactionList **tlp)
+postgres_get_coin_transactions (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ int include_recoup,
+ struct TALER_EXCHANGEDB_TransactionList **tlp)
{
struct PostgresClosure *pg = cls;
static const struct Work work_op[] = {
@@ -4609,12 +4603,12 @@ handle_wt_result (void *cls,
* @return query status of the transaction
*/
static enum GNUNET_DB_QueryStatus
-postgres_lookup_wire_transfer (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- TALER_EXCHANGEDB_AggregationDataCallback cb,
- void *cb_cls)
+postgres_lookup_wire_transfer (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ TALER_EXCHANGEDB_AggregationDataCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -4656,18 +4650,15 @@ postgres_lookup_wire_transfer (void *cls,
* @return transaction status code
- */
static enum GNUNET_DB_QueryStatus
-postgres_lookup_transfer_by_deposit (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- GNUNET_HashCode *h_contract_terms,
- const struct GNUNET_HashCode *h_wire,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- TALER_EXCHANGEDB_WireTransferByCoinCallback
- cb,
- void *cb_cls)
+postgres_lookup_transfer_by_deposit (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
enum GNUNET_DB_QueryStatus qs;
@@ -4761,11 +4752,11 @@ postgres_lookup_transfer_by_deposit (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_aggregation_tracking (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- unsigned long long deposit_serial_id)
+postgres_insert_aggregation_tracking (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ unsigned long long deposit_serial_id)
{
uint64_t rid = deposit_serial_id;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5055,16 +5046,15 @@ postgres_get_expired_reserves (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_reserve_closed (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- struct GNUNET_TIME_Absolute execution_date,
- const char *receiver_account,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- const struct TALER_Amount *amount_with_fee,
- const struct TALER_Amount *closing_fee)
+postgres_insert_reserve_closed (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ struct GNUNET_TIME_Absolute execution_date,
+ const char *receiver_account,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *closing_fee)
{
struct TALER_EXCHANGEDB_Reserve reserve;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5280,14 +5270,14 @@ postgres_start_deferred_wire_out (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_store_wire_transfer_out (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- struct GNUNET_TIME_Absolute date,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- const json_t *wire_account,
- const char *exchange_account_section,
- const struct TALER_Amount *amount)
+postgres_store_wire_transfer_out (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ struct GNUNET_TIME_Absolute date,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const json_t *wire_account,
+ const char *exchange_account_section,
+ const struct TALER_Amount *amount)
{
struct GNUNET_PQ_QueryParam params[] = {
TALER_PQ_query_param_absolute_time (&date),
@@ -5521,12 +5511,12 @@ deposit_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_deposits_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_DepositCallback cb,
- void *cb_cls)
+postgres_select_deposits_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_DepositCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5660,13 +5650,12 @@ refreshs_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_refreshes_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RefreshesCallback
- cb,
- void *cb_cls)
+postgres_select_refreshes_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RefreshesCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5799,12 +5788,12 @@ refunds_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_refunds_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RefundCallback cb,
- void *cb_cls)
+postgres_select_refunds_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RefundCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5934,13 +5923,12 @@ reserves_in_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_reserves_in_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveInCallback
- cb,
- void *cb_cls)
+postgres_select_reserves_in_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveInCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -5979,15 +5967,13 @@ postgres_select_reserves_in_above_serial_id (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_reserves_in_above_serial_id_by_account (void *cls,
- struct
- TALER_EXCHANGEDB_Session
- *session,
- const char *account_name,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveInCallback
- cb,
- void *cb_cls)
+postgres_select_reserves_in_above_serial_id_by_account (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *account_name,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveInCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6122,13 +6108,12 @@ reserves_out_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_withdrawals_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WithdrawCallback
- cb,
- void *cb_cls)
+postgres_select_withdrawals_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WithdrawCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6254,13 +6239,12 @@ wire_out_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_wire_out_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WireTransferOutCallback
- cb,
- void *cb_cls)
+postgres_select_wire_out_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WireTransferOutCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6299,15 +6283,13 @@ postgres_select_wire_out_above_serial_id (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_wire_out_above_serial_id_by_account (void *cls,
- struct
- TALER_EXCHANGEDB_Session *
- session,
- const char *account_name,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WireTransferOutCallback
- cb,
- void *cb_cls)
+postgres_select_wire_out_above_serial_id_by_account (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *account_name,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WireTransferOutCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6453,12 +6435,12 @@ recoup_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_recoup_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RecoupCallback cb,
- void *cb_cls)
+postgres_select_recoup_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RecoupCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6603,13 +6585,12 @@ recoup_refresh_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_recoup_refresh_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session
- *session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RecoupRefreshCallback
- cb,
- void *cb_cls)
+postgres_select_recoup_refresh_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RecoupRefreshCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6743,13 +6724,12 @@ reserve_closed_serial_helper_cb (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_select_reserve_closed_above_serial_id (void *cls,
- struct TALER_EXCHANGEDB_Session
- *session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveClosedCallback
- cb,
- void *cb_cls)
+postgres_select_reserve_closed_above_serial_id (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveClosedCallback cb,
+ void *cb_cls)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -6793,18 +6773,16 @@ postgres_select_reserve_closed_above_serial_id (void *cls,
* @return transaction result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_recoup_request (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_CoinPublicInfo *coin,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *coin_blind,
- const struct TALER_Amount *amount,
- const struct GNUNET_HashCode *h_blind_ev,
- struct GNUNET_TIME_Absolute timestamp)
+postgres_insert_recoup_request (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind,
+ const struct TALER_Amount *amount,
+ const struct GNUNET_HashCode *h_blind_ev,
+ struct GNUNET_TIME_Absolute timestamp)
{
struct PostgresClosure *pg = cls;
struct GNUNET_TIME_Absolute expiry;
@@ -6888,20 +6866,15 @@ postgres_insert_recoup_request (void *cls,
* @return transaction result status
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_recoup_refresh_request (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- const struct
- TALER_CoinPublicInfo *coin,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *
- coin_blind,
- const struct TALER_Amount *amount,
- const struct
- GNUNET_HashCode *h_blind_ev,
- struct GNUNET_TIME_Absolute timestamp)
+postgres_insert_recoup_refresh_request (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind,
+ const struct TALER_Amount *amount,
+ const struct GNUNET_HashCode *h_blind_ev,
+ struct GNUNET_TIME_Absolute timestamp)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (&coin->coin_pub),
@@ -7007,13 +6980,11 @@ postgres_get_old_coin_by_h_blind (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_insert_denomination_revocation (void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- const struct
- TALER_MasterSignatureP *master_sig)
+postgres_insert_denomination_revocation (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ const struct TALER_MasterSignatureP *master_sig)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
@@ -7040,12 +7011,12 @@ postgres_insert_denomination_revocation (void *cls,
* @return transaction status code
*/
static enum GNUNET_DB_QueryStatus
-postgres_get_denomination_revocation (void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- struct TALER_MasterSignatureP *master_sig,
- uint64_t *rowid)
+postgres_get_denomination_revocation (
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct TALER_MasterSignatureP *master_sig,
+ uint64_t *rowid)
{
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_auto_from_type (denom_pub_hash),
diff --git a/src/include/taler_auditordb_plugin.h b/src/include/taler_auditordb_plugin.h
index 843cc4ca7..9a7f6ed7a 100644
--- a/src/include/taler_auditordb_plugin.h
+++ b/src/include/taler_auditordb_plugin.h
@@ -38,10 +38,10 @@
* @param exchange_url base URL of the exchange's API
*/
typedef void
-(*TALER_AUDITORDB_ExchangeCallback)(void *cls,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const char *exchange_url);
+(*TALER_AUDITORDB_ExchangeCallback)(
+ void *cls,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *exchange_url);
/**
@@ -56,10 +56,9 @@ typedef void
* #GNUNET_SYSERR or other values on error.
*/
typedef int
-(*TALER_AUDITORDB_DenominationInfoDataCallback)(void *cls,
- const struct
- TALER_DenominationKeyValidityPS
- *issue);
+(*TALER_AUDITORDB_DenominationInfoDataCallback)(
+ void *cls,
+ const struct TALER_DenominationKeyValidityPS *issue);
/**
@@ -78,19 +77,12 @@ typedef int
* #GNUNET_SYSERR or other values on error.
*/
typedef int
-(*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)(void *cls,
- const struct
- GNUNET_HashCode *
- denom_pub_hash,
- struct
- GNUNET_TIME_Absolute
- revenue_timestamp,
- const struct
- TALER_Amount *
- revenue_balance,
- const struct
- TALER_Amount *
- loss_balance);
+(*TALER_AUDITORDB_HistoricDenominationRevenueDataCallback)(
+ void *cls,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct GNUNET_TIME_Absolute revenue_timestamp,
+ const struct TALER_Amount *revenue_balance,
+ const struct TALER_Amount *loss_balance);
/**
@@ -107,16 +99,11 @@ typedef int
* #GNUNET_SYSERR or other values on error.
*/
typedef int
-(*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)(void *cls,
- struct
- GNUNET_TIME_Absolute
- start_time,
- struct
- GNUNET_TIME_Absolute
- end_time,
- const struct
- TALER_Amount *
- reserve_profits);
+(*TALER_AUDITORDB_HistoricReserveRevenueDataCallback)(
+ void *cls,
+ struct GNUNET_TIME_Absolute start_time,
+ struct GNUNET_TIME_Absolute end_time,
+ const struct TALER_Amount *reserve_profits);
/**
@@ -379,11 +366,10 @@ struct TALER_AUDITORDB_DepositConfirmation
* @param dc the deposit confirmation itself
*/
typedef void
-(*TALER_AUDITORDB_DepositConfirmationCallback)(void *cls,
- uint64_t serial_id,
- const struct
- TALER_AUDITORDB_DepositConfirmation
- *dc);
+(*TALER_AUDITORDB_DepositConfirmationCallback)(
+ void *cls,
+ uint64_t serial_id,
+ const struct TALER_AUDITORDB_DepositConfirmation *dc);
/**
@@ -553,10 +539,10 @@ struct TALER_AUDITORDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_exchange_signkey)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_AUDITORDB_ExchangeSigningKey *sk);
+ (*insert_exchange_signkey)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_AUDITORDB_ExchangeSigningKey *sk);
/**
@@ -568,10 +554,10 @@ struct TALER_AUDITORDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_deposit_confirmation)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_AUDITORDB_DepositConfirmation *dc);
+ (*insert_deposit_confirmation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_AUDITORDB_DepositConfirmation *dc);
/**
@@ -587,13 +573,13 @@ struct TALER_AUDITORDB_Plugin
* @return query result status
*/
enum GNUNET_DB_QueryStatus
- (*get_deposit_confirmations)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_public_key,
- uint64_t start_id,
- TALER_AUDITORDB_DepositConfirmationCallback cb,
- void *cb_cls);
+ (*get_deposit_confirmations)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_public_key,
+ uint64_t start_id,
+ TALER_AUDITORDB_DepositConfirmationCallback cb,
+ void *cb_cls);
/**
@@ -607,10 +593,10 @@ struct TALER_AUDITORDB_Plugin
* @return status of database operation
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_info)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_DenominationKeyValidityPS *issue);
+ (*insert_denomination_info)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_DenominationKeyValidityPS *issue);
/**
@@ -642,12 +628,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_progress_coin)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointCoin *ppc);
+ (*insert_auditor_progress_coin)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
/**
@@ -661,12 +646,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor_progress_coin)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointCoin *ppc);
+ (*update_auditor_progress_coin)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointCoin *ppc);
/**
@@ -695,12 +679,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_progress_reserve)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointReserve *ppr);
+ (*insert_auditor_progress_reserve)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
/**
@@ -714,12 +697,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor_progress_reserve)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointReserve *ppr);
+ (*update_auditor_progress_reserve)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointReserve *ppr);
/**
@@ -732,12 +714,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_auditor_progress_reserve)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct TALER_AUDITORDB_ProgressPointReserve *
- ppr);
+ (*get_auditor_progress_reserve)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointReserve *ppr);
/**
* Insert information about the auditor's progress with an exchange's
@@ -750,15 +731,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_progress_deposit_confirmation)(void *cls,
- struct TALER_AUDITORDB_Session
- *session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc);
+ (*insert_auditor_progress_deposit_confirmation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
/**
@@ -772,15 +749,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor_progress_deposit_confirmation)(void *cls,
- struct TALER_AUDITORDB_Session
- *session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc);
+ (*update_auditor_progress_deposit_confirmation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
/**
@@ -793,15 +766,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_auditor_progress_deposit_confirmation)(void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *
- master_pub,
- struct
- TALER_AUDITORDB_ProgressPointDepositConfirmation
- *ppdc);
+ (*get_auditor_progress_deposit_confirmation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointDepositConfirmation *ppdc);
/**
@@ -815,13 +784,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_auditor_progress_aggregation)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointAggregation
- *ppa);
+ (*insert_auditor_progress_aggregation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
/**
@@ -835,13 +802,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_auditor_progress_aggregation)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_ProgressPointAggregation
- *ppa);
+ (*update_auditor_progress_aggregation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
/**
@@ -854,13 +819,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_auditor_progress_aggregation)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct
- TALER_AUDITORDB_ProgressPointAggregation *
- ppa);
+ (*get_auditor_progress_aggregation)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct TALER_AUDITORDB_ProgressPointAggregation *ppa);
/**
@@ -877,17 +840,14 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire_auditor_account_progress)(void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const char *account_name,
- const struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t in_wire_off,
- uint64_t out_wire_off);
+ (*insert_wire_auditor_account_progress)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t in_wire_off,
+ uint64_t out_wire_off);
/**
@@ -904,17 +864,14 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_wire_auditor_account_progress)(void *cls,
- struct TALER_AUDITORDB_Session *
- session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const char *account_name,
- const struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t in_wire_off,
- uint64_t out_wire_off);
+ (*update_wire_auditor_account_progress)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ const struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t in_wire_off,
+ uint64_t out_wire_off);
/**
@@ -930,16 +887,14 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_wire_auditor_account_progress)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const char *account_name,
- struct
- TALER_AUDITORDB_WireAccountProgressPoint
- *pp,
- uint64_t *in_wire_off,
- uint64_t *out_wire_off);
+ (*get_wire_auditor_account_progress)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const char *account_name,
+ struct TALER_AUDITORDB_WireAccountProgressPoint *pp,
+ uint64_t *in_wire_off,
+ uint64_t *out_wire_off);
/**
@@ -954,12 +909,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_wire_auditor_progress)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_WireProgressPoint *pp);
+ (*insert_wire_auditor_progress)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_WireProgressPoint *pp);
/**
@@ -974,12 +928,11 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*update_wire_auditor_progress)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_AUDITORDB_WireProgressPoint *pp);
+ (*update_wire_auditor_progress)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_AUDITORDB_WireProgressPoint *pp);
/**
@@ -1394,16 +1347,14 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_historic_denom_revenue)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct GNUNET_HashCode *denom_pub_hash,
- struct GNUNET_TIME_Absolute
- revenue_timestamp,
- const struct TALER_Amount *revenue_balance,
- const struct
- TALER_Amount *recoup_loss_balance);
+ (*insert_historic_denom_revenue)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct GNUNET_TIME_Absolute revenue_timestamp,
+ const struct TALER_Amount *revenue_balance,
+ const struct TALER_Amount *recoup_loss_balance);
/**
@@ -1418,13 +1369,12 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_historic_denom_revenue)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_AUDITORDB_HistoricDenominationRevenueDataCallback
- cb,
- void *cb_cls);
+ (*select_historic_denom_revenue)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_AUDITORDB_HistoricDenominationRevenueDataCallback cb,
+ void *cb_cls);
/**
@@ -1439,14 +1389,13 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_historic_reserve_revenue)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- struct GNUNET_TIME_Absolute start_time,
- struct GNUNET_TIME_Absolute end_time,
- const struct
- TALER_Amount *reserve_profits);
+ (*insert_historic_reserve_revenue)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ struct GNUNET_TIME_Absolute start_time,
+ struct GNUNET_TIME_Absolute end_time,
+ const struct TALER_Amount *reserve_profits);
/**
@@ -1460,13 +1409,12 @@ struct TALER_AUDITORDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_historic_reserve_revenue)(void *cls,
- struct TALER_AUDITORDB_Session *session,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_AUDITORDB_HistoricReserveRevenueDataCallback
- cb,
- void *cb_cls);
+ (*select_historic_reserve_revenue)(
+ void *cls,
+ struct TALER_AUDITORDB_Session *session,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_AUDITORDB_HistoricReserveRevenueDataCallback cb,
+ void *cb_cls);
/**
diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h
index e65a4847e..44487a61a 100644
--- a/src/include/taler_bank_service.h
+++ b/src/include/taler_bank_service.h
@@ -138,14 +138,14 @@ typedef void
* In this case, the callback is not called.
*/
struct TALER_BANK_AdminAddIncomingHandle *
-TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
- const struct TALER_BANK_AuthenticationData *auth,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *amount,
- const char *debit_account,
- TALER_BANK_AdminAddIncomingCallback res_cb,
- void *res_cb_cls);
+TALER_BANK_admin_add_incoming (
+ struct GNUNET_CURL_Context *ctx,
+ const struct TALER_BANK_AuthenticationData *auth,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *amount,
+ const char *debit_account,
+ TALER_BANK_AdminAddIncomingCallback res_cb,
+ void *res_cb_cls);
/**
@@ -155,8 +155,8 @@ TALER_BANK_admin_add_incoming (struct GNUNET_CURL_Context *ctx,
* @param aai the admin add incoming request handle
*/
void
-TALER_BANK_admin_add_incoming_cancel (struct
- TALER_BANK_AdminAddIncomingHandle *aai);
+TALER_BANK_admin_add_incoming_cancel (
+ struct TALER_BANK_AdminAddIncomingHandle *aai);
/* ********************* /transfer *********************** */
@@ -174,13 +174,13 @@ TALER_BANK_admin_add_incoming_cancel (struct
* @param[out] buf_size set to number of bytes in @a buf, 0 on error
*/
void
-TALER_BANK_prepare_transfer (const char *destination_account_payto_uri,
- const struct TALER_Amount *amount,
- const char *exchange_base_url,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- void **buf,
- size_t *buf_size);
+TALER_BANK_prepare_transfer (
+ const char *destination_account_payto_uri,
+ const struct TALER_Amount *amount,
+ const char *exchange_base_url,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ void **buf,
+ size_t *buf_size);
/**
@@ -305,13 +305,13 @@ struct TALER_BANK_CreditDetails
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
*/
typedef int
-(*TALER_BANK_CreditHistoryCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- uint64_t serial_id,
- const struct
- TALER_BANK_CreditDetails *details,
- const json_t *json);
+(*TALER_BANK_CreditHistoryCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ uint64_t serial_id,
+ const struct TALER_BANK_CreditDetails *details,
+ const json_t *json);
/**
@@ -415,13 +415,13 @@ struct TALER_BANK_DebitDetails
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to abort iteration
*/
typedef int
-(*TALER_BANK_DebitHistoryCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- uint64_t serial_id,
- const struct
- TALER_BANK_DebitDetails *details,
- const json_t *json);
+(*TALER_BANK_DebitHistoryCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ uint64_t serial_id,
+ const struct TALER_BANK_DebitDetails *details,
+ const json_t *json);
/**
diff --git a/src/include/taler_crypto_lib.h b/src/include/taler_crypto_lib.h
index 206a3db3d..dbf038311 100644
--- a/src/include/taler_crypto_lib.h
+++ b/src/include/taler_crypto_lib.h
@@ -633,11 +633,10 @@ TALER_planchet_to_coin (const struct TALER_DenominationPublicKey *dk,
* @param[out] ts computed transfer secret
*/
void
-TALER_link_derive_transfer_secret (const struct
- TALER_CoinSpendPrivateKeyP *coin_priv,
- const struct
- TALER_TransferPrivateKeyP *trans_priv,
- struct TALER_TransferSecretP *ts);
+TALER_link_derive_transfer_secret (
+ const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+ const struct TALER_TransferPrivateKeyP *trans_priv,
+ struct TALER_TransferSecretP *ts);
/**
@@ -649,11 +648,10 @@ TALER_link_derive_transfer_secret (const struct
* @param[out] transfer_secret set to the shared secret
*/
void
-TALER_link_reveal_transfer_secret (const struct
- TALER_TransferPrivateKeyP *trans_priv,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- struct TALER_TransferSecretP *transfer_secret);
+TALER_link_reveal_transfer_secret (
+ const struct TALER_TransferPrivateKeyP *trans_priv,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct TALER_TransferSecretP *transfer_secret);
/**
@@ -665,12 +663,10 @@ TALER_link_reveal_transfer_secret (const struct
* @param[out] transfer_secret set to the shared secret
*/
void
-TALER_link_recover_transfer_secret (const struct
- TALER_TransferPublicKeyP *trans_pub,
- const struct
- TALER_CoinSpendPrivateKeyP *coin_priv,
- struct TALER_TransferSecretP *
- transfer_secret);
+TALER_link_recover_transfer_secret (
+ const struct TALER_TransferPublicKeyP *trans_pub,
+ const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+ struct TALER_TransferSecretP *transfer_secret);
/**
@@ -758,11 +754,10 @@ TALER_exchange_wire_signature_hash (const char *payto_uri,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_exchange_wire_signature_check (const char *payto_uri,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_MasterSignatureP *master_sig);
+TALER_exchange_wire_signature_check (
+ const char *payto_uri,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_MasterSignatureP *master_sig);
/**
@@ -773,10 +768,10 @@ TALER_exchange_wire_signature_check (const char *payto_uri,
* @param[out] master_sig where to write the signature
*/
void
-TALER_exchange_wire_signature_make (const char *payto_uri,
- const struct
- TALER_MasterPrivateKeyP *master_priv,
- struct TALER_MasterSignatureP *master_sig);
+TALER_exchange_wire_signature_make (
+ const char *payto_uri,
+ const struct TALER_MasterPrivateKeyP *master_priv,
+ struct TALER_MasterSignatureP *master_sig);
/**
@@ -804,12 +799,11 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_merchant_wire_signature_check (const char *payto_uri,
- const char *salt,
- const struct
- TALER_MerchantPublicKeyP *merch_pub,
- const struct
- TALER_MerchantSignatureP *merch_sig);
+TALER_merchant_wire_signature_check (
+ const char *payto_uri,
+ const char *salt,
+ const struct TALER_MerchantPublicKeyP *merch_pub,
+ const struct TALER_MerchantSignatureP *merch_sig);
/**
@@ -821,11 +815,11 @@ TALER_merchant_wire_signature_check (const char *payto_uri,
* @param[out] merch_sig where to write the signature
*/
void
-TALER_merchant_wire_signature_make (const char *payto_uri,
- const char *salt,
- const struct
- TALER_MerchantPrivateKeyP *merch_priv,
- struct TALER_MerchantSignatureP *merch_sig);
+TALER_merchant_wire_signature_make (
+ const char *payto_uri,
+ const char *salt,
+ const struct TALER_MerchantPrivateKeyP *merch_priv,
+ struct TALER_MerchantSignatureP *merch_sig);
#endif
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index 175f08f17..311175e41 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -355,11 +355,10 @@ enum TALER_EXCHANGE_VersionCompatibility
* @param compat protocol compatibility information
*/
typedef void
-(*TALER_EXCHANGE_CertificationCallback) (void *cls,
- const struct TALER_EXCHANGE_Keys *keys,
- enum
- TALER_EXCHANGE_VersionCompatibility
- compat);
+(*TALER_EXCHANGE_CertificationCallback) (
+ void *cls,
+ const struct TALER_EXCHANGE_Keys *keys,
+ enum TALER_EXCHANGE_VersionCompatibility compat);
/**
@@ -547,9 +546,9 @@ TALER_EXCHANGE_destroy_denomination_key (struct
* @return details about the given denomination key
*/
const struct TALER_EXCHANGE_DenomPublicKey *
-TALER_EXCHANGE_get_denomination_key_by_hash (const struct
- TALER_EXCHANGE_Keys *keys,
- const struct GNUNET_HashCode *hc);
+TALER_EXCHANGE_get_denomination_key_by_hash (
+ const struct TALER_EXCHANGE_Keys *keys,
+ const struct GNUNET_HashCode *hc);
/**
@@ -561,11 +560,9 @@ TALER_EXCHANGE_get_denomination_key_by_hash (const struct
* @return NULL on error (@a exchange_pub not known)
*/
const struct TALER_EXCHANGE_SigningPublicKey *
-TALER_EXCHANGE_get_signing_key_info (const struct
- TALER_EXCHANGE_Keys *keys,
- const struct
- TALER_ExchangePublicKeyP *
- exchange_pub);
+TALER_EXCHANGE_get_signing_key_info (
+ const struct TALER_EXCHANGE_Keys *keys,
+ const struct TALER_ExchangePublicKeyP *exchange_pub);
/* ********************* /wire *********************** */
@@ -648,12 +645,12 @@ struct TALER_EXCHANGE_WireAccount
* @param accounts list of wire accounts of the exchange, NULL on error
*/
typedef void
-(*TALER_EXCHANGE_WireCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- unsigned int accounts_len,
- const struct
- TALER_EXCHANGE_WireAccount *accounts);
+(*TALER_EXCHANGE_WireCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ unsigned int accounts_len,
+ const struct TALER_EXCHANGE_WireAccount *accounts);
/**
@@ -719,14 +716,13 @@ struct TALER_EXCHANGE_DepositHandle;
* be forwarded to the customer)
*/
typedef void
-(*TALER_EXCHANGE_DepositResultCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct
- TALER_ExchangeSignatureP *exchange_sig,
- const struct
- TALER_ExchangePublicKeyP *sign_key,
- const json_t *obj);
+(*TALER_EXCHANGE_DepositResultCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_ExchangeSignatureP *exchange_sig,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *obj);
/**
@@ -820,12 +816,12 @@ struct TALER_EXCHANGE_RefundHandle;
* be forwarded to the customer)
*/
typedef void
-(*TALER_EXCHANGE_RefundCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct
- TALER_ExchangePublicKeyP *sign_key,
- const json_t *obj);
+(*TALER_EXCHANGE_RefundCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *obj);
/**
@@ -1103,16 +1099,15 @@ struct TALER_EXCHANGE_ReserveHistory
* @param history detailed transaction history, NULL on error
*/
typedef void
-(*TALER_EXCHANGE_ReservesGetCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const json_t *json,
- const struct
- TALER_Amount *balance,
- unsigned int history_length,
- const struct
- TALER_EXCHANGE_ReserveHistory *
- history);
+(*TALER_EXCHANGE_ReservesGetCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const json_t *json,
+ const struct
+ TALER_Amount *balance,
+ unsigned int history_length,
+ const struct TALER_EXCHANGE_ReserveHistory *history);
/**
@@ -1132,11 +1127,11 @@ typedef void
* signatures fail to verify). In this case, the callback is not called.
*/
struct TALER_EXCHANGE_ReservesGetHandle *
-TALER_EXCHANGE_reserves_get (struct TALER_EXCHANGE_Handle *exchange,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- TALER_EXCHANGE_ReservesGetCallback cb,
- void *cb_cls);
+TALER_EXCHANGE_reserves_get (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ TALER_EXCHANGE_ReservesGetCallback cb,
+ void *cb_cls);
/**
@@ -1146,8 +1141,8 @@ TALER_EXCHANGE_reserves_get (struct TALER_EXCHANGE_Handle *exchange,
* @param rgh the reserve request handle
*/
void
-TALER_EXCHANGE_reserves_get_cancel (struct
- TALER_EXCHANGE_ReservesGetHandle *rgh);
+TALER_EXCHANGE_reserves_get_cancel (
+ struct TALER_EXCHANGE_ReservesGetHandle *rgh);
/* ********************* POST /reserves/$RESERVE_PUB/withdraw *********************** */
@@ -1171,12 +1166,12 @@ struct TALER_EXCHANGE_WithdrawHandle;
* @param full_response full response from the exchange (for logging, in case of errors)
*/
typedef void
-(*TALER_EXCHANGE_WithdrawCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct
- TALER_DenominationSignature *sig,
- const json_t *full_response);
+(*TALER_EXCHANGE_WithdrawCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_DenominationSignature *sig,
+ const json_t *full_response);
/**
@@ -1201,14 +1196,13 @@ typedef void
* In this case, the callback is not called.
*/
struct TALER_EXCHANGE_WithdrawHandle *
-TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange,
- const struct TALER_EXCHANGE_DenomPublicKey *pk,
- const struct
- TALER_ReservePrivateKeyP *reserve_priv,
- const struct TALER_PlanchetSecretsP *ps,
- TALER_EXCHANGE_WithdrawCallback
- res_cb,
- void *res_cb_cls);
+TALER_EXCHANGE_withdraw (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_EXCHANGE_DenomPublicKey *pk,
+ const struct TALER_ReservePrivateKeyP *reserve_priv,
+ const struct TALER_PlanchetSecretsP *ps,
+ TALER_EXCHANGE_WithdrawCallback res_cb,
+ void *res_cb_cls);
/**
@@ -1234,17 +1228,14 @@ TALER_EXCHANGE_withdraw (struct TALER_EXCHANGE_Handle *exchange,
* In this case, the callback is not called.
*/
struct TALER_EXCHANGE_WithdrawHandle *
-TALER_EXCHANGE_withdraw2 (struct TALER_EXCHANGE_Handle *exchange,
- const struct
- TALER_EXCHANGE_DenomPublicKey *pk,
- const struct
- TALER_ReserveSignatureP *reserve_sig,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_PlanchetSecretsP *ps,
- TALER_EXCHANGE_WithdrawCallback
- res_cb,
- void *res_cb_cls);
+TALER_EXCHANGE_withdraw2 (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_EXCHANGE_DenomPublicKey *pk,
+ const struct TALER_ReserveSignatureP *reserve_sig,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_PlanchetSecretsP *ps,
+ TALER_EXCHANGE_WithdrawCallback res_cb,
+ void *res_cb_cls);
/**
@@ -1299,17 +1290,14 @@ TALER_EXCHANGE_withdraw_cancel (struct TALER_EXCHANGE_WithdrawHandle *wh);
* Non-null results should be freed using GNUNET_free().
*/
char *
-TALER_EXCHANGE_refresh_prepare (const struct
- TALER_CoinSpendPrivateKeyP *melt_priv,
- const struct TALER_Amount *melt_amount,
- const struct
- TALER_DenominationSignature *melt_sig,
- const struct
- TALER_EXCHANGE_DenomPublicKey *melt_pk,
- unsigned int fresh_pks_len,
- const struct
- TALER_EXCHANGE_DenomPublicKey *fresh_pks,
- size_t *res_size);
+TALER_EXCHANGE_refresh_prepare (
+ const struct TALER_CoinSpendPrivateKeyP *melt_priv,
+ const struct TALER_Amount *melt_amount,
+ const struct TALER_DenominationSignature *melt_sig,
+ const struct TALER_EXCHANGE_DenomPublicKey *melt_pk,
+ unsigned int fresh_pks_len,
+ const struct TALER_EXCHANGE_DenomPublicKey *fresh_pks,
+ size_t *res_size);
/* ********************* /coins/$COIN_PUB/melt ***************************** */
@@ -1403,15 +1391,14 @@ TALER_EXCHANGE_melt_cancel (struct TALER_EXCHANGE_MeltHandle *mh);
* @param full_response full response from the exchange (for logging, in case of errors)
*/
typedef void
-(*TALER_EXCHANGE_RefreshesRevealCallback)(void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- unsigned int num_coins,
- const struct
- TALER_PlanchetSecretsP *coin_privs,
- const struct
- TALER_DenominationSignature *sigs,
- const json_t *full_response);
+(*TALER_EXCHANGE_RefreshesRevealCallback)(
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ unsigned int num_coins,
+ const struct TALER_PlanchetSecretsP *coin_privs,
+ const struct TALER_DenominationSignature *sigs,
+ const json_t *full_response);
/**
@@ -1443,13 +1430,13 @@ struct TALER_EXCHANGE_RefreshesRevealHandle;
* In this case, neither callback will be called.
*/
struct TALER_EXCHANGE_RefreshesRevealHandle *
-TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange,
- size_t refresh_data_length,
- const char *refresh_data,
- uint32_t noreveal_index,
- TALER_EXCHANGE_RefreshesRevealCallback
- reveal_cb,
- void *reveal_cb_cls);
+TALER_EXCHANGE_refreshes_reveal (
+ struct TALER_EXCHANGE_Handle *exchange,
+ size_t refresh_data_length,
+ const char *refresh_data,
+ uint32_t noreveal_index,
+ TALER_EXCHANGE_RefreshesRevealCallback reveal_cb,
+ void *reveal_cb_cls);
/**
@@ -1459,9 +1446,8 @@ TALER_EXCHANGE_refreshes_reveal (struct TALER_EXCHANGE_Handle *exchange,
* @param rrh the refresh reval handle
*/
void
-TALER_EXCHANGE_refreshes_reveal_cancel (struct
- TALER_EXCHANGE_RefreshesRevealHandle *
- rrh);
+TALER_EXCHANGE_refreshes_reveal_cancel (
+ struct TALER_EXCHANGE_RefreshesRevealHandle *rrh);
/* ********************* /coins/$COIN_PUB/link ***************************** */
@@ -1490,17 +1476,15 @@ struct TALER_EXCHANGE_LinkHandle;
* @param full_response full response from the exchange (for logging, in case of errors)
*/
typedef void
-(*TALER_EXCHANGE_LinkCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- unsigned int num_coins,
- const struct
- TALER_CoinSpendPrivateKeyP *coin_privs,
- const struct
- TALER_DenominationSignature *sigs,
- const struct
- TALER_DenominationPublicKey *pubs,
- const json_t *full_response);
+(*TALER_EXCHANGE_LinkCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ unsigned int num_coins,
+ const struct TALER_CoinSpendPrivateKeyP *coin_privs,
+ const struct TALER_DenominationSignature *sigs,
+ const struct TALER_DenominationPublicKey *pubs,
+ const json_t *full_response);
/**
@@ -1560,20 +1544,18 @@ struct TALER_EXCHANGE_TransfersGetHandle;
* @param details array with details about the combined transactions
*/
typedef void
-(*TALER_EXCHANGE_TransfersGetCallback)(void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct
- TALER_ExchangePublicKeyP *sign_key,
- const json_t *json,
- const struct GNUNET_HashCode *h_wire,
- struct GNUNET_TIME_Absolute
- execution_time,
- const struct TALER_Amount *total_amount,
- const struct TALER_Amount *wire_fee,
- unsigned int details_length,
- const struct
- TALER_TrackTransferDetails *details);
+(*TALER_EXCHANGE_TransfersGetCallback)(
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *json,
+ const struct GNUNET_HashCode *h_wire,
+ struct GNUNET_TIME_Absolute execution_time,
+ const struct TALER_Amount *total_amount,
+ const struct TALER_Amount *wire_fee,
+ unsigned int details_length,
+ const struct TALER_TrackTransferDetails *details);
/**
@@ -1587,11 +1569,11 @@ typedef void
* @return handle to cancel operation
*/
struct TALER_EXCHANGE_TransfersGetHandle *
-TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- TALER_EXCHANGE_TransfersGetCallback cb,
- void *cb_cls);
+TALER_EXCHANGE_transfers_get (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ TALER_EXCHANGE_TransfersGetCallback cb,
+ void *cb_cls);
/**
@@ -1601,8 +1583,8 @@ TALER_EXCHANGE_transfers_get (struct TALER_EXCHANGE_Handle *exchange,
* @param wdh the wire deposits request handle
*/
void
-TALER_EXCHANGE_transfers_get_cancel (struct
- TALER_EXCHANGE_TransfersGetHandle *wdh);
+TALER_EXCHANGE_transfers_get_cancel (
+ struct TALER_EXCHANGE_TransfersGetHandle *wdh);
/* ********************* GET /deposits/ *********************** */
@@ -1629,19 +1611,16 @@ struct TALER_EXCHANGE_DepositGetHandle;
* @param coin_contribution contribution to the total amount by this coin (can be NULL)
*/
typedef void
-(*TALER_EXCHANGE_DepositGetCallback)(void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct
- TALER_ExchangePublicKeyP *sign_key,
- const json_t *json,
- const struct
- TALER_WireTransferIdentifierRawP *
- wtid,
- struct GNUNET_TIME_Absolute
- execution_time,
- const struct
- TALER_Amount *coin_contribution);
+(*TALER_EXCHANGE_DepositGetCallback)(
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_ExchangePublicKeyP *sign_key,
+ const json_t *json,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ struct GNUNET_TIME_Absolute
+ execution_time,
+ const struct TALER_Amount *coin_contribution);
/**
@@ -1659,16 +1638,14 @@ typedef void
* @return handle to abort request
*/
struct TALER_EXCHANGE_DepositGetHandle *
-TALER_EXCHANGE_deposits_get (struct TALER_EXCHANGE_Handle *exchange,
- const struct
- TALER_MerchantPrivateKeyP *merchant_priv,
- const struct GNUNET_HashCode *h_wire,
- const struct
- GNUNET_HashCode *h_contract_terms,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- TALER_EXCHANGE_DepositGetCallback cb,
- void *cb_cls);
+TALER_EXCHANGE_deposits_get (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const struct TALER_MerchantPrivateKeyP *merchant_priv,
+ const struct GNUNET_HashCode *h_wire,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ TALER_EXCHANGE_DepositGetCallback cb,
+ void *cb_cls);
/**
@@ -1678,9 +1655,8 @@ TALER_EXCHANGE_deposits_get (struct TALER_EXCHANGE_Handle *exchange,
* @param dwh the wire deposits request handle
*/
void
-TALER_EXCHANGE_deposits_get_cancel (struct
- TALER_EXCHANGE_DepositGetHandle *
- dwh);
+TALER_EXCHANGE_deposits_get_cancel (
+ struct TALER_EXCHANGE_DepositGetHandle *dwh);
/**
@@ -1695,13 +1671,12 @@ TALER_EXCHANGE_deposits_get_cancel (struct
* @return #GNUNET_OK if @a history is valid, #GNUNET_SYSERR if not
*/
int
-TALER_EXCHANGE_verify_coin_history (const struct
- TALER_EXCHANGE_DenomPublicKey *dk,
- const char *currency,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- json_t *history,
- struct TALER_Amount *total);
+TALER_EXCHANGE_verify_coin_history (
+ const struct TALER_EXCHANGE_DenomPublicKey *dk,
+ const char *currency,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ json_t *history,
+ struct TALER_Amount *total);
/**
@@ -1721,15 +1696,14 @@ TALER_EXCHANGE_verify_coin_history (const struct
* #GNUNET_SYSERR if there was a protocol violation in @a history
*/
int
-TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
- const json_t *history,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const char *currency,
- struct TALER_Amount *balance,
- unsigned int history_length,
- struct TALER_EXCHANGE_ReserveHistory *
- rhistory);
+TALER_EXCHANGE_parse_reserve_history (
+ struct TALER_EXCHANGE_Handle *exchange,
+ const json_t *history,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const char *currency,
+ struct TALER_Amount *balance,
+ unsigned int history_length,
+ struct TALER_EXCHANGE_ReserveHistory *rhistory);
/**
@@ -1739,9 +1713,9 @@ TALER_EXCHANGE_parse_reserve_history (struct TALER_EXCHANGE_Handle *exchange,
* @param len number of entries in @a rhistory
*/
void
-TALER_EXCHANGE_free_reserve_history (struct
- TALER_EXCHANGE_ReserveHistory *rhistory,
- unsigned int len);
+TALER_EXCHANGE_free_reserve_history (
+ struct TALER_EXCHANGE_ReserveHistory *rhistory,
+ unsigned int len);
/* ********************* /recoup *********************** */
@@ -1773,16 +1747,15 @@ struct TALER_EXCHANGE_RecoupHandle;
* @param full_response full response from the exchange (for logging, in case of errors)
*/
typedef void
-(*TALER_EXCHANGE_RecoupResultCallback) (void *cls,
- unsigned int http_status,
- enum TALER_ErrorCode ec,
- const struct TALER_Amount *amount,
- struct GNUNET_TIME_Absolute timestamp,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct
- TALER_CoinSpendPublicKeyP *old_coin_pub,
- const json_t *full_response);
+(*TALER_EXCHANGE_RecoupResultCallback) (
+ void *cls,
+ unsigned int http_status,
+ enum TALER_ErrorCode ec,
+ const struct TALER_Amount *amount,
+ struct GNUNET_TIME_Absolute timestamp,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
+ const json_t *full_response);
/**
diff --git a/src/include/taler_exchangedb_lib.h b/src/include/taler_exchangedb_lib.h
index b43b991d5..7139335cc 100644
--- a/src/include/taler_exchangedb_lib.h
+++ b/src/include/taler_exchangedb_lib.h
@@ -50,11 +50,10 @@
* #GNUNET_SYSERR to abort iteration with error!
*/
typedef int
-(*TALER_EXCHANGEDB_SigningKeyIterator)(void *cls,
- const char *filename,
- const struct
- TALER_EXCHANGEDB_PrivateSigningKeyInformationP
- *ski);
+(*TALER_EXCHANGEDB_SigningKeyIterator)(
+ void *cls,
+ const char *filename,
+ const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski);
/**
@@ -84,11 +83,10 @@ TALER_EXCHANGEDB_signing_keys_iterate (const char *exchange_base_dir,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
- struct GNUNET_TIME_Absolute start,
- const struct
- TALER_EXCHANGEDB_PrivateSigningKeyInformationP
- *ski);
+TALER_EXCHANGEDB_signing_key_write (
+ const char *exchange_base_dir,
+ struct GNUNET_TIME_Absolute start,
+ const struct TALER_EXCHANGEDB_PrivateSigningKeyInformationP *ski);
/**
@@ -102,11 +100,10 @@ TALER_EXCHANGEDB_signing_key_write (const char *exchange_base_dir,
* #GNUNET_SYSERR to abort iteration with error!
*/
typedef int
-(*TALER_EXCHANGEDB_DenominationKeyIterator)(void *cls,
- const char *alias,
- const struct
- TALER_EXCHANGEDB_DenominationKey
- *dki);
+(*TALER_EXCHANGEDB_DenominationKeyIterator)(
+ void *cls,
+ const char *alias,
+ const struct TALER_EXCHANGEDB_DenominationKey *dki);
/**
@@ -120,11 +117,10 @@ typedef int
* #GNUNET_SYSERR to abort iteration with error!
*/
typedef int
-(*TALER_EXCHANGEDB_RevocationIterator)(void *cls,
- const struct GNUNET_HashCode *denom_hash,
- const struct
- TALER_MasterSignatureP *
- revocation_master_sig);
+(*TALER_EXCHANGEDB_RevocationIterator)(
+ void *cls,
+ const struct GNUNET_HashCode *denom_hash,
+ const struct TALER_MasterSignatureP *revocation_master_sig);
/**
@@ -141,10 +137,10 @@ typedef int
* as maybe none of the files were well-formed)
*/
int
-TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
- TALER_EXCHANGEDB_DenominationKeyIterator
- it,
- void *it_cls);
+TALER_EXCHANGEDB_denomination_keys_iterate (
+ const char *exchange_base_dir,
+ TALER_EXCHANGEDB_DenominationKeyIterator it,
+ void *it_cls);
/**
@@ -160,11 +156,11 @@ TALER_EXCHANGEDB_denomination_keys_iterate (const char *exchange_base_dir,
* as maybe none of the files were well-formed)
*/
int
-TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- TALER_EXCHANGEDB_RevocationIterator it,
- void *it_cls);
+TALER_EXCHANGEDB_revocations_iterate (
+ const char *revocation_dir,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ TALER_EXCHANGEDB_RevocationIterator it,
+ void *it_cls);
/**
@@ -177,11 +173,10 @@ TALER_EXCHANGEDB_revocations_iterate (const char *revocation_dir,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
- const struct
- GNUNET_HashCode *denom_hash,
- const struct
- TALER_MasterPrivateKeyP *mpriv);
+TALER_EXCHANGEDB_denomination_key_revoke (
+ const char *revocation_dir,
+ const struct GNUNET_HashCode *denom_hash,
+ const struct TALER_MasterPrivateKeyP *mpriv);
/**
@@ -192,10 +187,9 @@ TALER_EXCHANGEDB_denomination_key_revoke (const char *revocation_dir,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_denomination_key_write (const char *filename,
- const struct
- TALER_EXCHANGEDB_DenominationKey
- *dki);
+TALER_EXCHANGEDB_denomination_key_write (
+ const char *filename,
+ const struct TALER_EXCHANGEDB_DenominationKey *dki);
/**
@@ -206,10 +200,9 @@ TALER_EXCHANGEDB_denomination_key_write (const char *filename,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure
*/
int
-TALER_EXCHANGEDB_denomination_key_read (const char *filename,
- struct
- TALER_EXCHANGEDB_DenominationKey
- *dki);
+TALER_EXCHANGEDB_denomination_key_read (
+ const char *filename,
+ struct TALER_EXCHANGEDB_DenominationKey *dki);
/**
@@ -227,14 +220,14 @@ TALER_EXCHANGEDB_denomination_key_read (const char *filename,
* #GNUNET_SYSERR to abort iteration with error!
*/
typedef int
-(*TALER_EXCHANGEDB_AuditorIterator)(void *cls,
- const struct TALER_AuditorPublicKeyP *apub,
- const char *auditor_url,
- const struct TALER_MasterPublicKeyP *mpub,
- unsigned int dki_len,
- const struct TALER_AuditorSignatureP *asigs,
- const struct
- TALER_DenominationKeyValidityPS *dki);
+(*TALER_EXCHANGEDB_AuditorIterator)(
+ void *cls,
+ const struct TALER_AuditorPublicKeyP *apub,
+ const char *auditor_url,
+ const struct TALER_MasterPublicKeyP *mpub,
+ unsigned int dki_len,
+ const struct TALER_AuditorSignatureP *asigs,
+ const struct TALER_DenominationKeyValidityPS *dki);
/**
@@ -268,14 +261,14 @@ TALER_EXCHANGEDB_auditor_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
* @return #GNUNET_OK upon success; #GNUNET_SYSERR upon failure.
*/
int
-TALER_EXCHANGEDB_auditor_write (const char *filename,
- const struct TALER_AuditorPublicKeyP *apub,
- const char *auditor_url,
- const struct TALER_AuditorSignatureP *asigs,
- const struct TALER_MasterPublicKeyP *mpub,
- unsigned int dki_len,
- const struct
- TALER_DenominationKeyValidityPS *dki);
+TALER_EXCHANGEDB_auditor_write (
+ const char *filename,
+ const struct TALER_AuditorPublicKeyP *apub,
+ const char *auditor_url,
+ const struct TALER_AuditorSignatureP *asigs,
+ const struct TALER_MasterPublicKeyP *mpub,
+ uint32_t dki_len,
+ const struct TALER_DenominationKeyValidityPS *dki);
/**
@@ -433,9 +426,9 @@ struct TALER_EXCHANGEDB_AccountInfo
* @param ai account information
*/
typedef void
-(*TALER_EXCHANGEDB_AccountCallback)(void *cls,
- const struct
- TALER_EXCHANGEDB_AccountInfo *ai);
+(*TALER_EXCHANGEDB_AccountCallback)(
+ void *cls,
+ const struct TALER_EXCHANGEDB_AccountInfo *ai);
/**
* Parse the configuration to find account information.
@@ -461,12 +454,10 @@ TALER_EXCHANGEDB_find_accounts (const struct GNUNET_CONFIGURATION_Handle *cfg,
* @return #GNUNET_OK on success, #GNUNET_SYSERR on errors
*/
int
-TALER_EXCHANGEDB_calculate_transaction_list_totals (struct
- TALER_EXCHANGEDB_TransactionList
- *tl,
- const struct
- TALER_Amount *off,
- struct TALER_Amount *ret);
+TALER_EXCHANGEDB_calculate_transaction_list_totals (
+ struct TALER_EXCHANGEDB_TransactionList *tl,
+ const struct TALER_Amount *off,
+ struct TALER_Amount *ret);
#endif
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 2511f32d4..d04914a3f 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -987,18 +987,16 @@ struct TALER_EXCHANGEDB_Session;
* @return transaction status code, #GNUNET_DB_STATUS_SUCCESS_ONE_RESULT to continue to iterate
*/
typedef enum GNUNET_DB_QueryStatus
-(*TALER_EXCHANGEDB_DepositIterator)(void *cls,
- uint64_t rowid,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct TALER_Amount *amount_with_fee,
- const struct TALER_Amount *deposit_fee,
- const struct
- GNUNET_HashCode *h_contract_terms,
- struct GNUNET_TIME_Absolute wire_deadline,
- const json_t *receiver_wire_account);
+(*TALER_EXCHANGEDB_DepositIterator)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *deposit_fee,
+ const struct GNUNET_HashCode *h_contract_terms,
+ struct GNUNET_TIME_Absolute wire_deadline,
+ const json_t *receiver_wire_account);
/**
@@ -1041,24 +1039,20 @@ typedef void
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_DepositCallback)(void *cls,
- uint64_t rowid,
- struct GNUNET_TIME_Absolute timestamp,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct TALER_Amount *amount_with_fee,
- const struct
- GNUNET_HashCode *h_contract_terms,
- struct GNUNET_TIME_Absolute refund_deadline,
- struct GNUNET_TIME_Absolute wire_deadline,
- const json_t *receiver_wire_account,
- int done);
+(*TALER_EXCHANGEDB_DepositCallback)(
+ void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute timestamp,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_Amount *amount_with_fee,
+ const struct GNUNET_HashCode *h_contract_terms,
+ struct GNUNET_TIME_Absolute refund_deadline,
+ struct GNUNET_TIME_Absolute wire_deadline,
+ const json_t *receiver_wire_account,
+ int done);
/**
@@ -1076,20 +1070,15 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_RefreshesCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_DenominationPublicKey *
- denom_pub,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_Amount *amount_with_fee,
- uint32_t noreveal_index,
- const struct
- TALER_RefreshCommitmentP *rc);
+(*TALER_EXCHANGEDB_RefreshesCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_Amount *amount_with_fee,
+ uint32_t noreveal_index,
+ const struct TALER_RefreshCommitmentP *rc);
/**
@@ -1101,9 +1090,9 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_RefundCoinCallback)(void *cls,
- const struct
- TALER_Amount *amount_with_fee);
+(*TALER_EXCHANGEDB_RefundCoinCallback)(
+ void *cls,
+ const struct TALER_Amount *amount_with_fee);
/**
@@ -1152,14 +1141,13 @@ struct TALER_EXCHANGEDB_RefreshRevealedCoin
* @param tp transfer public key information
*/
typedef void
-(*TALER_EXCHANGEDB_RefreshCallback)(void *cls,
- uint32_t num_freshcoins,
- const struct
- TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
- unsigned int num_tprivs,
- const struct
- TALER_TransferPrivateKeyP *tprivs,
- const struct TALER_TransferPublicKeyP *tp);
+(*TALER_EXCHANGEDB_RefreshCallback)(
+ void *cls,
+ uint32_t num_freshcoins,
+ const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
+ unsigned int num_tprivs,
+ const struct TALER_TransferPrivateKeyP *tprivs,
+ const struct TALER_TransferPublicKeyP *tp);
/**
@@ -1178,20 +1166,16 @@ typedef void
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_RefundCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- const struct
- TALER_MerchantSignatureP *merchant_sig,
- const struct
- GNUNET_HashCode *h_contract_terms,
- uint64_t rtransaction_id,
- const struct TALER_Amount *amount_with_fee);
+(*TALER_EXCHANGEDB_RefundCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct TALER_MerchantSignatureP *merchant_sig,
+ const struct GNUNET_HashCode *h_contract_terms,
+ uint64_t rtransaction_id,
+ const struct TALER_Amount *amount_with_fee);
/**
@@ -1207,15 +1191,14 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_ReserveInCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *credit,
- const char *sender_account_details,
- uint64_t wire_reference,
- struct GNUNET_TIME_Absolute
- execution_date);
+(*TALER_EXCHANGEDB_ReserveInCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *credit,
+ const char *sender_account_details,
+ uint64_t wire_reference,
+ struct GNUNET_TIME_Absolute execution_date);
/**
@@ -1232,18 +1215,15 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_WithdrawCallback)(void *cls,
- uint64_t rowid,
- const struct GNUNET_HashCode *h_blind_ev,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct
- TALER_ReserveSignatureP *reserve_sig,
- struct GNUNET_TIME_Absolute execution_date,
- const struct
- TALER_Amount *amount_with_fee);
+(*TALER_EXCHANGEDB_WithdrawCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct GNUNET_HashCode *h_blind_ev,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_ReserveSignatureP *reserve_sig,
+ struct GNUNET_TIME_Absolute execution_date,
+ const struct TALER_Amount *amount_with_fee);
/**
@@ -1255,10 +1235,10 @@ typedef int
* @param ldl link data for @a transfer_pub
*/
typedef void
-(*TALER_EXCHANGEDB_LinkCallback)(void *cls,
- const struct
- TALER_TransferPublicKeyP *transfer_pub,
- const struct TALER_EXCHANGEDB_LinkList *ldl);
+(*TALER_EXCHANGEDB_LinkCallback)(
+ void *cls,
+ const struct TALER_TransferPublicKeyP *transfer_pub,
+ const struct TALER_EXCHANGEDB_LinkList *ldl);
/**
@@ -1276,17 +1256,12 @@ typedef void
* when we expect it to be done (if @a wtid was NULL)
*/
typedef void
-(*TALER_EXCHANGEDB_WireTransferByCoinCallback)(void *cls,
- const struct
- TALER_WireTransferIdentifierRawP
- *
- wtid,
- const struct
- TALER_Amount *coin_contribution,
- const struct
- TALER_Amount *coin_fee,
- struct GNUNET_TIME_Absolute
- execution_time);
+(*TALER_EXCHANGEDB_WireTransferByCoinCallback)(
+ void *cls,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const struct TALER_Amount *coin_contribution,
+ const struct TALER_Amount *coin_fee,
+ struct GNUNET_TIME_Absolute execution_time);
/**
@@ -1306,27 +1281,18 @@ typedef void
* @param coin_fee applicable fee for this coin
*/
typedef void
-(*TALER_EXCHANGEDB_AggregationDataCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_MerchantPublicKeyP *
- merchant_pub,
- const struct
- GNUNET_HashCode *h_wire,
- const json_t *account_details,
- struct GNUNET_TIME_Absolute
- exec_time,
- const struct
- GNUNET_HashCode *h_contract_terms,
- const struct
- TALER_DenominationPublicKey *
- denom_pub,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_Amount *coin_value,
- const struct
- TALER_Amount *coin_fee);
+(*TALER_EXCHANGEDB_AggregationDataCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ const struct GNUNET_HashCode *h_wire,
+ const json_t *account_details,
+ struct GNUNET_TIME_Absolute exec_time,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_Amount *coin_value,
+ const struct TALER_Amount *coin_fee);
/**
@@ -1342,14 +1308,13 @@ typedef void
* @return #GNUNET_OK to continue, #GNUNET_SYSERR to stop iteration
*/
typedef int
-(*TALER_EXCHANGEDB_WireTransferOutCallback)(void *cls,
- uint64_t rowid,
- struct GNUNET_TIME_Absolute date,
- const struct
- TALER_WireTransferIdentifierRawP *
- wtid,
- const json_t *wire,
- const struct TALER_Amount *amount);
+(*TALER_EXCHANGEDB_WireTransferOutCallback)(
+ void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute date,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const json_t *wire,
+ const struct TALER_Amount *amount);
/**
@@ -1386,19 +1351,16 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_RecoupCallback)(void *cls,
- uint64_t rowid,
- struct GNUNET_TIME_Absolute timestamp,
- const struct TALER_Amount *amount,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_CoinPublicInfo *coin,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *coin_blind);
+(*TALER_EXCHANGEDB_RecoupCallback)(
+ void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute timestamp,
+ const struct TALER_Amount *amount,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind);
/**
@@ -1416,24 +1378,16 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_RecoupRefreshCallback)(void *cls,
- uint64_t rowid,
- struct GNUNET_TIME_Absolute
- timestamp,
- const struct TALER_Amount *amount,
- const struct
- TALER_CoinSpendPublicKeyP *
- old_coin_pub,
- const struct
- TALER_CoinPublicInfo *coin,
- const struct
- TALER_DenominationPublicKey *
- denom_pub,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *
- coin_blind);
+(*TALER_EXCHANGEDB_RecoupRefreshCallback)(
+ void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute timestamp,
+ const struct TALER_Amount *amount,
+ const struct TALER_CoinSpendPublicKeyP *old_coin_pub,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind);
/**
@@ -1451,19 +1405,15 @@ typedef int
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
-(*TALER_EXCHANGEDB_ReserveClosedCallback)(void *cls,
- uint64_t rowid,
- struct GNUNET_TIME_Absolute
- execution_date,
- const struct
- TALER_Amount *amount_with_fee,
- const struct
- TALER_Amount *closing_fee,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const char *receiver_account,
- const struct
- TALER_WireTransferIdentifierRawP *wtid);
+(*TALER_EXCHANGEDB_ReserveClosedCallback)(
+ void *cls,
+ uint64_t rowid,
+ struct GNUNET_TIME_Absolute execution_date,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *closing_fee,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const char *receiver_account,
+ const struct TALER_WireTransferIdentifierRawP *wtid);
/**
@@ -1477,13 +1427,12 @@ typedef int
* @return transaction status code to pass on
*/
typedef enum GNUNET_DB_QueryStatus
-(*TALER_EXCHANGEDB_ReserveExpiredCallback)(void *cls,
- const struct
- TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_Amount *left,
- const char *account_details,
- struct GNUNET_TIME_Absolute
- expiration_date);
+(*TALER_EXCHANGEDB_ReserveExpiredCallback)(
+ void *cls,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *left,
+ const char *account_details,
+ struct GNUNET_TIME_Absolute expiration_date);
/**
@@ -1499,20 +1448,14 @@ typedef enum GNUNET_DB_QueryStatus
* @param amount total amount to be paid back
*/
typedef void
-(*TALER_EXCHANGEDB_RecoupJustificationCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_CoinPublicInfo *coin,
- const struct
- TALER_CoinSpendSignatureP *
- coin_sig,
- const struct
- TALER_DenominationBlindingKeyP
- *coin_blind,
- const struct
- GNUNET_HashCode *h_blinded_ev,
- const struct
- TALER_Amount *amount);
+(*TALER_EXCHANGEDB_RecoupJustificationCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind,
+ const struct GNUNET_HashCode *h_blinded_ev,
+ const struct TALER_Amount *amount);
/**
@@ -1529,15 +1472,15 @@ typedef void
* @param done did the exchange claim that it made a transfer?
*/
typedef void
-(*TALER_EXCHANGEDB_WireMissingCallback)(void *cls,
- uint64_t rowid,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct TALER_Amount *amount,
- const json_t *wire,
- struct GNUNET_TIME_Absolute deadline,
- /* bool? */ int tiny,
- /* bool? */ int done);
+(*TALER_EXCHANGEDB_WireMissingCallback)(
+ void *cls,
+ uint64_t rowid,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_Amount *amount,
+ const json_t *wire,
+ struct GNUNET_TIME_Absolute deadline,
+ /* bool? */ int tiny,
+ /* bool? */ int done);
/**
@@ -1548,12 +1491,11 @@ typedef void
* @param issue detailed information about the denomination (value, expiration times, fees)
*/
typedef void
-(*TALER_EXCHANGEDB_DenominationCallback)(void *cls,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_EXCHANGEDB_DenominationKeyInformationP
- *issue);
+(*TALER_EXCHANGEDB_DenominationCallback)(
+ void *cls,
+ const struct
+ TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
/**
@@ -1668,13 +1610,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return status of the query
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_info)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_DenominationPublicKey *denom_pub,
- const struct
- TALER_EXCHANGEDB_DenominationKeyInformationP *
- issue);
+ (*insert_denomination_info)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_DenominationPublicKey *denom_pub,
+ const struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
/**
@@ -1687,11 +1627,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*get_denomination_info)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *denom_pub_hash,
- struct TALER_EXCHANGEDB_DenominationKeyInformationP *
- issue);
+ (*get_denomination_info)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ struct TALER_EXCHANGEDB_DenominationKeyInformationP *issue);
/**
@@ -2058,14 +1998,14 @@ struct TALER_EXCHANGEDB_Plugin
* transaction status code on error
*/
enum GNUNET_DB_QueryStatus
- (*iterate_matching_deposits)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_wire,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- TALER_EXCHANGEDB_DepositIterator deposit_cb,
- void *deposit_cb_cls,
- uint32_t limit);
+ (*iterate_matching_deposits)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ TALER_EXCHANGEDB_DepositIterator deposit_cb,
+ void *deposit_cb_cls,
+ uint32_t limit);
/**
@@ -2135,15 +2075,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return query status for the transaction
*/
enum GNUNET_DB_QueryStatus
- (*insert_refresh_reveal)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_RefreshCommitmentP *rc,
- uint32_t num_rrcs,
- const struct
- TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
- unsigned int num_tprivs,
- const struct TALER_TransferPrivateKeyP *tprivs,
- const struct TALER_TransferPublicKeyP *tp);
+ (*insert_refresh_reveal)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_RefreshCommitmentP *rc,
+ uint32_t num_rrcs,
+ const struct TALER_EXCHANGEDB_RefreshRevealedCoin *rrcs,
+ unsigned int num_tprivs,
+ const struct TALER_TransferPrivateKeyP *tprivs,
+ const struct TALER_TransferPublicKeyP *tp);
/**
@@ -2251,16 +2191,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*lookup_transfer_by_deposit)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct GNUNET_HashCode *h_contract_terms,
- const struct GNUNET_HashCode *h_wire,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- const struct
- TALER_MerchantPublicKeyP *merchant_pub,
- TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
- void *cb_cls);
+ (*lookup_transfer_by_deposit)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *h_contract_terms,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_MerchantPublicKeyP *merchant_pub,
+ TALER_EXCHANGEDB_WireTransferByCoinCallback cb,
+ void *cb_cls);
/**
@@ -2273,11 +2212,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_aggregation_tracking)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- unsigned long long deposit_serial_id);
+ (*insert_aggregation_tracking)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ unsigned long long deposit_serial_id);
/**
@@ -2451,14 +2390,14 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*store_wire_transfer_out)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- struct GNUNET_TIME_Absolute date,
- const struct
- TALER_WireTransferIdentifierRawP *wtid,
- const json_t *wire_account,
- const char *exchange_account_section,
- const struct TALER_Amount *amount);
+ (*store_wire_transfer_out)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ struct GNUNET_TIME_Absolute date,
+ const struct TALER_WireTransferIdentifierRawP *wtid,
+ const json_t *wire_account,
+ const char *exchange_account_section,
+ const struct TALER_Amount *amount);
/**
@@ -2561,15 +2500,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserves_in_above_serial_id_by_account)(void *cls,
- struct
- TALER_EXCHANGEDB_Session *
- session,
- const char *account_name,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveInCallback
- cb,
- void *cb_cls);
+ (*select_reserves_in_above_serial_id_by_account)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *account_name,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveInCallback cb,
+ void *cb_cls);
/**
@@ -2585,12 +2522,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_withdrawals_above_serial_id)(void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WithdrawCallback cb,
- void *cb_cls);
+ (*select_withdrawals_above_serial_id)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WithdrawCallback cb,
+ void *cb_cls);
/**
@@ -2624,14 +2561,13 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_wire_out_above_serial_id_by_account)(void *cls,
- struct TALER_EXCHANGEDB_Session
- *session,
- const char *account_name,
- uint64_t serial_id,
- TALER_EXCHANGEDB_WireTransferOutCallback
- cb,
- void *cb_cls);
+ (*select_wire_out_above_serial_id_by_account)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const char *account_name,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_WireTransferOutCallback cb,
+ void *cb_cls);
/**
@@ -2665,13 +2601,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_recoup_refresh_above_serial_id)(void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_RecoupRefreshCallback
- cb,
- void *cb_cls);
+ (*select_recoup_refresh_above_serial_id)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_RecoupRefreshCallback cb,
+ void *cb_cls);
/**
@@ -2686,13 +2621,12 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*select_reserve_closed_above_serial_id)(void *cls,
- struct TALER_EXCHANGEDB_Session *
- session,
- uint64_t serial_id,
- TALER_EXCHANGEDB_ReserveClosedCallback
- cb,
- void *cb_cls);
+ (*select_reserve_closed_above_serial_id)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ uint64_t serial_id,
+ TALER_EXCHANGEDB_ReserveClosedCallback cb,
+ void *cb_cls);
/**
@@ -2712,16 +2646,16 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_recoup_request)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- const struct TALER_CoinPublicInfo *coin,
- const struct TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *coin_blind,
- const struct TALER_Amount *amount,
- const struct GNUNET_HashCode *h_blind_ev,
- struct GNUNET_TIME_Absolute timestamp);
+ (*insert_recoup_request)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind,
+ const struct TALER_Amount *amount,
+ const struct GNUNET_HashCode *h_blind_ev,
+ struct GNUNET_TIME_Absolute timestamp);
/**
@@ -2740,16 +2674,15 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction result status
*/
enum GNUNET_DB_QueryStatus
- (*insert_recoup_refresh_request)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct TALER_CoinPublicInfo *coin,
- const struct
- TALER_CoinSpendSignatureP *coin_sig,
- const struct
- TALER_DenominationBlindingKeyP *coin_blind,
- const struct TALER_Amount *amount,
- const struct GNUNET_HashCode *h_blind_ev,
- struct GNUNET_TIME_Absolute timestamp);
+ (*insert_recoup_refresh_request)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct TALER_CoinPublicInfo *coin,
+ const struct TALER_CoinSpendSignatureP *coin_sig,
+ const struct TALER_DenominationBlindingKeyP *coin_blind,
+ const struct TALER_Amount *amount,
+ const struct GNUNET_HashCode *h_blind_ev,
+ struct GNUNET_TIME_Absolute timestamp);
/**
@@ -2797,12 +2730,11 @@ struct TALER_EXCHANGEDB_Plugin
* @return transaction status code
*/
enum GNUNET_DB_QueryStatus
- (*insert_denomination_revocation)(void *cls,
- struct TALER_EXCHANGEDB_Session *session,
- const struct
- GNUNET_HashCode *denom_pub_hash,
- const struct
- TALER_MasterSignatureP *master_sig);
+ (*insert_denomination_revocation)(
+ void *cls,
+ struct TALER_EXCHANGEDB_Session *session,
+ const struct GNUNET_HashCode *denom_pub_hash,
+ const struct TALER_MasterSignatureP *master_sig);
/**
diff --git a/src/include/taler_fakebank_lib.h b/src/include/taler_fakebank_lib.h
index 8601a8d8d..bd4376695 100644
--- a/src/include/taler_fakebank_lib.h
+++ b/src/include/taler_fakebank_lib.h
@@ -76,19 +76,19 @@ TALER_FAKEBANK_check_empty (struct TALER_FAKEBANK_Handle *h);
* @param exchange_base_url exchange URL
* @param request_uid unique number to make the request unique, or NULL to create one
* @param[out] ret_row_id pointer to store the row ID of this transaction
- * @return GNUNET_YES if the transfer was successful,
- * GNUNET_SYSERR if the request_uid was reused for a different transfer
+ * @return #GNUNET_YES if the transfer was successful,
+ * #GNUNET_SYSERR if the request_uid was reused for a different transfer
*/
int
-TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
- const char *debit_account,
- const char *credit_account,
- const struct TALER_Amount *amount,
- const struct
- TALER_WireTransferIdentifierRawP *subject,
- const char *exchange_base_url,
- const struct GNUNET_HashCode *request_uid,
- uint64_t *ret_row_id);
+TALER_FAKEBANK_make_transfer (
+ struct TALER_FAKEBANK_Handle *h,
+ const char *debit_account,
+ const char *credit_account,
+ const struct TALER_Amount *amount,
+ const struct TALER_WireTransferIdentifierRawP *subject,
+ const char *exchange_base_url,
+ const struct GNUNET_HashCode *request_uid,
+ uint64_t *ret_row_id);
/**
@@ -102,12 +102,12 @@ TALER_FAKEBANK_make_transfer (struct TALER_FAKEBANK_Handle *h,
* @return serial_id of the transfer
*/
uint64_t
-TALER_FAKEBANK_make_admin_transfer (struct TALER_FAKEBANK_Handle *h,
- const char *debit_account,
- const char *credit_account,
- const struct TALER_Amount *amount,
- const struct
- TALER_ReservePublicKeyP *reserve_pub);
+TALER_FAKEBANK_make_admin_transfer (
+ struct TALER_FAKEBANK_Handle *h,
+ const char *debit_account,
+ const char *credit_account,
+ const struct TALER_Amount *amount,
+ const struct TALER_ReservePublicKeyP *reserve_pub);
/**
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index c4e107c09..34d984f70 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -170,9 +170,9 @@ TALER_JSON_merchant_wire_signature_hash (const json_t *wire_s,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
- const struct
- TALER_MasterPublicKeyP *master_pub);
+TALER_JSON_exchange_wire_signature_check (
+ const json_t *wire_s,
+ const struct TALER_MasterPublicKeyP *master_pub);
/**
@@ -183,9 +183,9 @@ TALER_JSON_exchange_wire_signature_check (const json_t *wire_s,
* @return NULL if @a payto_uri is malformed
*/
json_t *
-TALER_JSON_exchange_wire_signature_make (const char *payto_uri,
- const struct
- TALER_MasterPrivateKeyP *master_priv);
+TALER_JSON_exchange_wire_signature_make (
+ const char *payto_uri,
+ const struct TALER_MasterPrivateKeyP *master_priv);
/**
diff --git a/src/util/crypto.c b/src/util/crypto.c
index 3544fdcc4..e650f1902 100644
--- a/src/util/crypto.c
+++ b/src/util/crypto.c
@@ -121,11 +121,10 @@ TALER_test_coin_valid (const struct TALER_CoinPublicInfo *coin_public_info,
* @param[out] ts computed transfer secret
*/
void
-TALER_link_derive_transfer_secret (const struct
- TALER_CoinSpendPrivateKeyP *coin_priv,
- const struct
- TALER_TransferPrivateKeyP *trans_priv,
- struct TALER_TransferSecretP *ts)
+TALER_link_derive_transfer_secret (
+ const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+ const struct TALER_TransferPrivateKeyP *trans_priv,
+ struct TALER_TransferSecretP *ts)
{
struct TALER_CoinSpendPublicKeyP coin_pub;
@@ -148,11 +147,10 @@ TALER_link_derive_transfer_secret (const struct
* @param[out] transfer_secret set to the shared secret
*/
void
-TALER_link_reveal_transfer_secret (const struct
- TALER_TransferPrivateKeyP *trans_priv,
- const struct
- TALER_CoinSpendPublicKeyP *coin_pub,
- struct TALER_TransferSecretP *transfer_secret)
+TALER_link_reveal_transfer_secret (
+ const struct TALER_TransferPrivateKeyP *trans_priv,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ struct TALER_TransferSecretP *transfer_secret)
{
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_ecdh_eddsa (&trans_priv->ecdhe_priv,
@@ -170,12 +168,10 @@ TALER_link_reveal_transfer_secret (const struct
* @param[out] transfer_secret set to the shared secret
*/
void
-TALER_link_recover_transfer_secret (const struct
- TALER_TransferPublicKeyP *trans_pub,
- const struct
- TALER_CoinSpendPrivateKeyP *coin_priv,
- struct TALER_TransferSecretP *
- transfer_secret)
+TALER_link_recover_transfer_secret (
+ const struct TALER_TransferPublicKeyP *trans_pub,
+ const struct TALER_CoinSpendPrivateKeyP *coin_priv,
+ struct TALER_TransferSecretP *transfer_secret)
{
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_eddsa_ecdh (&coin_priv->eddsa_priv,
diff --git a/src/util/crypto_wire.c b/src/util/crypto_wire.c
index d935bec4d..6fdf65511 100644
--- a/src/util/crypto_wire.c
+++ b/src/util/crypto_wire.c
@@ -54,11 +54,10 @@ TALER_exchange_wire_signature_hash (const char *payto_uri,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_exchange_wire_signature_check (const char *payto_uri,
- const struct
- TALER_MasterPublicKeyP *master_pub,
- const struct
- TALER_MasterSignatureP *master_sig)
+TALER_exchange_wire_signature_check (
+ const char *payto_uri,
+ const struct TALER_MasterPublicKeyP *master_pub,
+ const struct TALER_MasterSignatureP *master_sig)
{
struct TALER_MasterWireDetailsPS wd;
@@ -81,10 +80,10 @@ TALER_exchange_wire_signature_check (const char *payto_uri,
* @param[out] master_sig where to write the signature
*/
void
-TALER_exchange_wire_signature_make (const char *payto_uri,
- const struct
- TALER_MasterPrivateKeyP *master_priv,
- struct TALER_MasterSignatureP *master_sig)
+TALER_exchange_wire_signature_make (
+ const char *payto_uri,
+ const struct TALER_MasterPrivateKeyP *master_priv,
+ struct TALER_MasterSignatureP *master_sig)
{
struct TALER_MasterWireDetailsPS wd;
@@ -144,12 +143,11 @@ TALER_merchant_wire_signature_hash (const char *payto_uri,
* @return #GNUNET_OK if signature is valid
*/
int
-TALER_merchant_wire_signature_check (const char *payto_uri,
- const char *salt,
- const struct
- TALER_MerchantPublicKeyP *merch_pub,
- const struct
- TALER_MerchantSignatureP *merch_sig)
+TALER_merchant_wire_signature_check (
+ const char *payto_uri,
+ const char *salt,
+ const struct TALER_MerchantPublicKeyP *merch_pub,
+ const struct TALER_MerchantSignatureP *merch_sig)
{
struct TALER_MasterWireDetailsPS wd;
@@ -174,11 +172,11 @@ TALER_merchant_wire_signature_check (const char *payto_uri,
* @param[out] merch_sig where to write the signature
*/
void
-TALER_merchant_wire_signature_make (const char *payto_uri,
- const char *salt,
- const struct
- TALER_MerchantPrivateKeyP *merch_priv,
- struct TALER_MerchantSignatureP *merch_sig)
+TALER_merchant_wire_signature_make (
+ const char *payto_uri,
+ const char *salt,
+ const struct TALER_MerchantPrivateKeyP *merch_priv,
+ struct TALER_MerchantSignatureP *merch_sig)
{
struct TALER_MasterWireDetailsPS wd;