donau

Donation authority for GNU Taler (experimental)
Log | Files | Refs | Submodules | README | LICENSE

commit 5f55e0564482c8a7d04de5e95ba663571e16a9dd
parent e617cdcf7196d228bd1f8d5521fd77a2c8151ba4
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Sun, 19 Jul 2026 23:50:09 +0200

do check signature

Diffstat:
Msrc/lib/donau_api_donation_statement_get.c | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/lib/donau_api_donation_statement_get.c b/src/lib/donau_api_donation_statement_get.c @@ -118,6 +118,22 @@ handle_donation_statement_get_finished (void *cls, dsresp.hr.http_status = 0; dsresp.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; } + else if (GNUNET_OK != + DONAU_donation_statement_verify ( + &dsresp.details.ok.total_amount, + (uint32_t) dsgh->year, + &dsgh->h_donor_tax_id, + &dsresp.details.ok.donau_pub, + &dsresp.details.ok.donation_statement_sig)) + { + /* The donau returned a total/signature that does not verify under + the returned donau public key. NOTE: the caller must still + cross-check donau_pub against the trusted signing keys from + /keys; this only rejects internally-inconsistent replies. */ + GNUNET_break_op (0); + dsresp.hr.http_status = 0; + dsresp.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; + } dsgh->cb (dsgh->cb_cls, &dsresp); dsgh->cb = NULL;