summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_common.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-17 15:10:14 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-17 15:18:09 +0100
commita351bfc4b4ca15ce7fd998cf9691e85cf84dc426 (patch)
tree88ec3b739914739f05d4c8cae2a2af40d29ebf82 /src/lib/exchange_api_common.c
parent8bdf6ab19df70c16d335ecf82f2c3b2117eeb70e (diff)
downloadexchange-a351bfc4b4ca15ce7fd998cf9691e85cf84dc426.tar.gz
exchange-a351bfc4b4ca15ce7fd998cf9691e85cf84dc426.tar.bz2
exchange-a351bfc4b4ca15ce7fd998cf9691e85cf84dc426.zip
-fix CS nonce reuse check logic
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r--src/lib/exchange_api_common.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index d03409244..4f3e878d4 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -171,10 +171,10 @@ TALER_EXCHANGE_parse_reserve_history (
&h_denom_pub);
if ( (GNUNET_YES !=
TALER_amount_cmp_currency (&withdraw_fee,
- &dki->fee_withdraw)) ||
+ &dki->fees.withdraw)) ||
(0 !=
TALER_amount_cmp (&withdraw_fee,
- &dki->fee_withdraw)) )
+ &dki->fees.withdraw)) )
{
GNUNET_break_op (0);
GNUNET_JSON_parse_free (withdraw_spec);
@@ -529,10 +529,10 @@ TALER_EXCHANGE_verify_coin_history (
/* check that deposit fee matches our expectations from /keys! */
if ( (GNUNET_YES !=
TALER_amount_cmp_currency (&fee,
- &dk->fee_deposit)) ||
+ &dk->fees.deposit)) ||
(0 !=
TALER_amount_cmp (&fee,
- &dk->fee_deposit)) )
+ &dk->fees.deposit)) )
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -575,10 +575,10 @@ TALER_EXCHANGE_verify_coin_history (
/* check that melt fee matches our expectations from /keys! */
if ( (GNUNET_YES !=
TALER_amount_cmp_currency (&fee,
- &dk->fee_refresh)) ||
+ &dk->fees.refresh)) ||
(0 !=
TALER_amount_cmp (&fee,
- &dk->fee_refresh)) )
+ &dk->fees.refresh)) )
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -669,10 +669,10 @@ TALER_EXCHANGE_verify_coin_history (
{
if ( (GNUNET_YES !=
TALER_amount_cmp_currency (&refund_fee,
- &dk->fee_refund)) ||
+ &dk->fees.refund)) ||
(0 !=
TALER_amount_cmp (&refund_fee,
- &dk->fee_refund)) )
+ &dk->fees.refund)) )
{
GNUNET_break_op (0);
return GNUNET_SYSERR;
@@ -863,6 +863,11 @@ TALER_EXCHANGE_verify_coin_history (
}
add = GNUNET_NO;
}
+ else if (0 == strcasecmp (type,
+ "LOCK_NONCE"))
+ {
+ GNUNET_break (0); // FIXME: implement!
+ }
else
{
/* signature not supported, new version on server? */