diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-12-22 22:18:02 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-12-22 22:18:02 +0100 |
commit | a162761ceb2e1678703b984dfb1608d5144e8b10 (patch) | |
tree | d2ca7b76e3ebb0d99a6635a7bcc26e6d2acf48da /src | |
parent | f7745020a3eb7f63194956ada075862bd1d0a6d6 (diff) | |
parent | 54a19689ab02a413e360ab2267c0c5a899b95711 (diff) |
Merge branch 'master' of ssh://git.taler.net/exchange
Diffstat (limited to 'src')
-rw-r--r-- | src/json/json_helper.c | 13 | ||||
-rw-r--r-- | src/lib/exchange_api_batch_withdraw.c | 9 |
2 files changed, 15 insertions, 7 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 9f57c56fc..01ca45f2b 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c @@ -1174,6 +1174,7 @@ parse_exchange_withdraw_values (void *cls, }; const char *emsg; unsigned int eline; + enum GNUNET_CRYPTO_BlindSignatureAlgorithm ci; (void) cls; if (GNUNET_OK != @@ -1185,17 +1186,18 @@ parse_exchange_withdraw_values (void *cls, GNUNET_break_op (0); return GNUNET_SYSERR; } - bi = GNUNET_new (struct GNUNET_CRYPTO_BlindingInputValues); - bi->cipher = string_to_cipher (cipher); - bi->rc = 1; - switch (bi->cipher) + ci = string_to_cipher (cipher); + switch (ci) { case GNUNET_CRYPTO_BSA_INVALID: break; case GNUNET_CRYPTO_BSA_RSA: - ewv->blinding_inputs = bi; + ewv->blinding_inputs = TALER_denom_ewv_rsa_singleton ()->blinding_inputs; return GNUNET_OK; case GNUNET_CRYPTO_BSA_CS: + bi = GNUNET_new (struct GNUNET_CRYPTO_BlindingInputValues); + bi->cipher = GNUNET_CRYPTO_BSA_CS; + bi->rc = 1; { struct GNUNET_JSON_Specification ispec[] = { GNUNET_JSON_spec_fixed ( @@ -1224,7 +1226,6 @@ parse_exchange_withdraw_values (void *cls, } } GNUNET_break_op (0); - GNUNET_free (bi); return GNUNET_SYSERR; } diff --git a/src/lib/exchange_api_batch_withdraw.c b/src/lib/exchange_api_batch_withdraw.c index cd3286f3c..bc5abd539 100644 --- a/src/lib/exchange_api_batch_withdraw.c +++ b/src/lib/exchange_api_batch_withdraw.c @@ -74,7 +74,7 @@ struct CoinData struct TALER_PlanchetDetail pd; /** - * Values of the @cipher selected + * Values of the cipher selected */ struct TALER_ExchangeWithdrawValues alg_values; @@ -304,6 +304,8 @@ withdraw_cs_stage_two_callback ( switch (csrr->hr.http_status) { case MHD_HTTP_OK: + GNUNET_assert (NULL == + cd->alg_values.blinding_inputs); TALER_denom_ewv_deep_copy (&cd->alg_values, &csrr->details.ok.alg_values); TALER_planchet_setup_coin_priv (&cd->ps, @@ -323,7 +325,12 @@ withdraw_cs_stage_two_callback ( &cd->pd)) { GNUNET_break (0); + wr.hr.http_status = 0; + wr.hr.ec = TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR; + wh->cb (wh->cb_cls, + &wr); TALER_EXCHANGE_batch_withdraw_cancel (wh); + return; } wh->cs_pending--; if (0 == wh->cs_pending) |