exchange

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

commit 4e847a7ff3cb3b3636437a4aa50f1d26cb357d96
parent 997985637dbd3229066996d3d3afb24729573d21
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 18 Nov 2026 17:55:39 +0100

fix #12213

Diffstat:
Msrc/util/crypto_helper_cs.c | 26++++++++++++++++++++++++++
Msrc/util/crypto_helper_rsa.c | 13+++++++++++++
2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/src/util/crypto_helper_cs.c b/src/util/crypto_helper_cs.c @@ -615,11 +615,24 @@ more: do_disconnect (dh); return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; } + if (finished) + { + /* more replies than requests in this batch */ + GNUNET_break_op (0); + do_disconnect (dh); + return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } { const struct TALER_CRYPTO_SignFailure *sf = (const struct TALER_CRYPTO_SignFailure *) buf; ec = (enum TALER_ErrorCode) (int) ntohl (sf->ec); + if (TALER_EC_NONE == ec) + { + /* a failure must not pass for success */ + GNUNET_break_op (0); + ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Signing %u failed with status %d!\n", wpos, @@ -864,11 +877,24 @@ more: do_disconnect (dh); return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; } + if (finished) + { + /* more replies than requests in this batch */ + GNUNET_break_op (0); + do_disconnect (dh); + return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } { const struct TALER_CRYPTO_RDeriveFailure *rdf = (const struct TALER_CRYPTO_RDeriveFailure *) buf; ec = (enum TALER_ErrorCode) (int) ntohl (rdf->ec); + if (TALER_EC_NONE == ec) + { + /* a failure must not pass for success */ + GNUNET_break_op (0); + ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "R derivation %u failed with status %d!\n", wpos, diff --git a/src/util/crypto_helper_rsa.c b/src/util/crypto_helper_rsa.c @@ -628,11 +628,24 @@ more: do_disconnect (dh); return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; } + if (finished) + { + /* more replies than requests in this batch */ + GNUNET_break_op (0); + do_disconnect (dh); + return TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } { const struct TALER_CRYPTO_SignFailure *sf = (const struct TALER_CRYPTO_SignFailure *) buf; ec = (enum TALER_ErrorCode) (int) ntohl (sf->ec); + if (TALER_EC_NONE == ec) + { + /* a failure must not pass for success */ + GNUNET_break_op (0); + ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Signing %u failed with status %d!\n", wpos,