exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit a5e6f1ab7b277265cd081afc8528b5997d5efa73
parent c4e97f990dec479d65a98c354f162563e7e17396
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon, 29 Jun 2026 22:06:08 +0200

check exchange signing key provided is OK

Diffstat:
Msrc/lib/exchange_api_get-coins-COIN_PUB-history.c | 34+++++++++++++++++++++++++++++++++-
1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/lib/exchange_api_get-coins-COIN_PUB-history.c b/src/lib/exchange_api_get-coins-COIN_PUB-history.c @@ -100,7 +100,7 @@ struct CoinHistoryParseContext /** * Keys of the exchange. */ - struct TALER_EXCHANGE_Keys *keys; + const struct TALER_EXCHANGE_Keys *keys; /** * Denomination of the coin. @@ -422,6 +422,13 @@ help_recoup (struct CoinHistoryParseContext *pc, return GNUNET_SYSERR; } if (GNUNET_OK != + TALER_EXCHANGE_test_signing_key (pc->keys, + &rh->details.recoup.exchange_pub)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != TALER_exchange_online_confirm_recoup_verify ( rh->details.recoup.timestamp, amount, @@ -489,6 +496,14 @@ help_recoup_refresh (struct CoinHistoryParseContext *pc, return GNUNET_SYSERR; } if (GNUNET_OK != + TALER_EXCHANGE_test_signing_key ( + pc->keys, + &rh->details.recoup_refresh.exchange_pub)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != TALER_exchange_online_confirm_recoup_refresh_verify ( rh->details.recoup_refresh.timestamp, amount, @@ -552,6 +567,14 @@ help_old_coin_recoup (struct CoinHistoryParseContext *pc, return GNUNET_SYSERR; } if (GNUNET_OK != + TALER_EXCHANGE_test_signing_key ( + pc->keys, + &rh->details.old_coin_recoup.exchange_pub)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != TALER_exchange_online_confirm_recoup_refresh_verify ( rh->details.old_coin_recoup.timestamp, amount, @@ -674,6 +697,14 @@ help_purse_refund (struct CoinHistoryParseContext *pc, return GNUNET_SYSERR; } if (GNUNET_OK != + TALER_EXCHANGE_test_signing_key ( + pc->keys, + &rh->details.purse_refund.exchange_pub)) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (GNUNET_OK != TALER_exchange_online_purse_refund_verify ( amount, &rh->details.purse_refund.refund_fee, @@ -806,6 +837,7 @@ TALER_EXCHANGE_parse_coin_history ( { NULL, NULL, TALER_EXCHANGE_CTT_NONE } }; struct CoinHistoryParseContext pc = { + .keys = keys, .dk = dk, .coin_pub = coin_pub, .total_out = total_out,