exchange

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

commit 3f26929ce39b61deeb2a5d37a52cba2ddbbfa514
parent 433e99d4e7be0c9c9a234e43f07e7d30fc80837c
Author: Özgür Kesim <oec@codeblau.de>
Date:   Wed,  7 May 2025 09:04:25 +0200

[testing] add withdraw idempotency scenario

Diffstat:
Msrc/testing/test_exchange_api.c | 23++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/src/testing/test_exchange_api.c b/src/testing/test_exchange_api.c @@ -145,14 +145,23 @@ run (void *cls, 0, /* age restriction off */ MHD_HTTP_OK), /** - * Withdraw EUR:1 using the SAME private coin key as for the previous coin - * (in violation of the specification, to be detected on spending!). - * However, note that this does NOT work with 'CS', as for a different - * denomination we get different R0/R1 values from the exchange, and - * thus will generate a different coin private key as R0/R1 are hashed - * into the coin priv. So here, we fail to 'reuse' the key due to the - * cryptographic construction! + * Idempotent withdrawal */ + TALER_TESTING_cmd_withdraw_amount_reuse_key ("withdraw-coin-1-idem", + "create-reserve-1", + "EUR:5", + 0, /* age restriction off */ + "withdraw-coin-1", + MHD_HTTP_OK), + /** + * Withdraw EUR:1 using the SAME private coin key as for the previous coin + * (in violation of the specification, to be detected on spending!). + * However, note that this does NOT work with 'CS', as for a different + * denomination we get different R0/R1 values from the exchange, and + * thus will generate a different coin private key as R0/R1 are hashed + * into the coin priv. So here, we fail to 'reuse' the key due to the + * cryptographic construction! + */ TALER_TESTING_cmd_withdraw_amount_reuse_key ("withdraw-coin-1x", "create-reserve-1", "EUR:1",