summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-08-23 14:22:59 +0200
committerChristian Grothoff <christian@grothoff.org>2022-08-23 14:22:59 +0200
commit758a149059fa1bc9874886a65c8808fb4c7996d1 (patch)
treeb033cc9e894151edc3611f063a085b548e379b02 /src
parent0ad509bd104f64cbfac286146f74496876d6fc9c (diff)
downloadexchange-758a149059fa1bc9874886a65c8808fb4c7996d1.tar.gz
exchange-758a149059fa1bc9874886a65c8808fb4c7996d1.tar.bz2
exchange-758a149059fa1bc9874886a65c8808fb4c7996d1.zip
-fix report generation field name missmatch
Diffstat (limited to 'src')
-rw-r--r--src/auditor/taler-helper-auditor-wire.c6
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_purse.c32
-rw-r--r--src/lib/exchange_api_purse_create_with_merge.c17
3 files changed, 32 insertions, 23 deletions
diff --git a/src/auditor/taler-helper-auditor-wire.c b/src/auditor/taler-helper-auditor-wire.c
index 28a87a391..2596a31eb 100644
--- a/src/auditor/taler-helper-auditor-wire.c
+++ b/src/auditor/taler-helper-auditor-wire.c
@@ -1318,7 +1318,7 @@ complain_out_not_found (void *cls,
"profit_drains"),
GNUNET_JSON_pack_uint64 ("row",
serial),
- GNUNET_JSON_pack_data_auto ("wtid",
+ GNUNET_JSON_pack_data_auto ("id",
&roi->details.wtid),
GNUNET_JSON_pack_string ("diagnostic",
"invalid signature")));
@@ -1695,7 +1695,7 @@ reserve_in_cb (void *cls,
"reserves_in"),
GNUNET_JSON_pack_uint64 ("row",
rowid),
- GNUNET_JSON_pack_data_auto ("wire_offset_hash",
+ GNUNET_JSON_pack_data_auto ("id",
&rii->row_off_hash),
GNUNET_JSON_pack_string ("diagnostic",
"duplicate wire offset")));
@@ -2096,7 +2096,7 @@ reserve_closed_cb (void *cls,
"reserves_closures"),
GNUNET_JSON_pack_uint64 ("row",
rowid),
- GNUNET_JSON_pack_data_auto ("reserve_pub",
+ GNUNET_JSON_pack_data_auto ("id",
reserve_pub),
TALER_JSON_pack_amount ("amount_with_fee",
amount_with_fee),
diff --git a/src/exchange/taler-exchange-httpd_reserves_purse.c b/src/exchange/taler-exchange-httpd_reserves_purse.c
index f7266bd24..930acf542 100644
--- a/src/exchange/taler-exchange-httpd_reserves_purse.c
+++ b/src/exchange/taler-exchange-httpd_reserves_purse.c
@@ -536,6 +536,23 @@ TEH_handler_reserves_purse (
reserve_pub);
TALER_payto_hash (payto_uri,
&rpc.h_payto);
+ TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++;
+ if (GNUNET_OK !=
+ TALER_wallet_purse_merge_verify (payto_uri,
+ rpc.merge_timestamp,
+ &rpc.pd.purse_pub,
+ &rpc.merge_pub,
+ &rpc.merge_sig))
+ {
+ GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
+ GNUNET_free (payto_uri);
+ return TALER_MHD_reply_with_error (
+ connection,
+ MHD_HTTP_FORBIDDEN,
+ TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID,
+ NULL);
+ }
GNUNET_free (payto_uri);
}
GNUNET_assert (GNUNET_OK ==
@@ -628,21 +645,6 @@ TEH_handler_reserves_purse (
NULL);
}
if (GNUNET_OK !=
- TALER_wallet_purse_merge_verify (TEH_base_url,
- rpc.merge_timestamp,
- &rpc.pd.purse_pub,
- &rpc.merge_pub,
- &rpc.merge_sig))
- {
- GNUNET_break_op (0);
- GNUNET_JSON_parse_free (spec);
- return TALER_MHD_reply_with_error (
- connection,
- MHD_HTTP_FORBIDDEN,
- TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID,
- NULL);
- }
- if (GNUNET_OK !=
TALER_wallet_account_merge_verify (rpc.merge_timestamp,
&rpc.pd.purse_pub,
rpc.pd.purse_expiration,
diff --git a/src/lib/exchange_api_purse_create_with_merge.c b/src/lib/exchange_api_purse_create_with_merge.c
index 9fd1d552f..460239fc8 100644
--- a/src/lib/exchange_api_purse_create_with_merge.c
+++ b/src/lib/exchange_api_purse_create_with_merge.c
@@ -454,11 +454,18 @@ TALER_EXCHANGE_purse_create_with_merge (
&pcm->purse_value_after_fees,
purse_priv,
&pcm->purse_sig);
- TALER_wallet_purse_merge_sign (exchange->url,
- merge_timestamp,
- &pcm->purse_pub,
- merge_priv,
- &pcm->merge_sig);
+ {
+ char *payto_uri;
+
+ payto_uri = TALER_reserve_make_payto (exchange->url,
+ &pcm->reserve_pub);
+ TALER_wallet_purse_merge_sign (payto_uri,
+ merge_timestamp,
+ &pcm->purse_pub,
+ merge_priv,
+ &pcm->merge_sig);
+ GNUNET_free (payto_uri);
+ }
TALER_wallet_account_merge_sign (merge_timestamp,
&pcm->purse_pub,
pcm->purse_expiration,