aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_recoup.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-05 23:01:21 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-05 23:01:21 +0100
commitc3e244322b6b7234c0234471b07d67bf6a210b91 (patch)
tree6b5b73eddac8662bacb74406c24a3277a0252048 /src/exchange/taler-exchange-httpd_recoup.c
parenteaf9d728f54681be4e9ed3467ff9d10e71ad2b04 (diff)
more crypto refactoring
Diffstat (limited to 'src/exchange/taler-exchange-httpd_recoup.c')
-rw-r--r--src/exchange/taler-exchange-httpd_recoup.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/exchange/taler-exchange-httpd_recoup.c b/src/exchange/taler-exchange-httpd_recoup.c
index f10bd34b..be4471c0 100644
--- a/src/exchange/taler-exchange-httpd_recoup.c
+++ b/src/exchange/taler-exchange-httpd_recoup.c
@@ -352,8 +352,6 @@ verify_and_execute_recoup (
struct RecoupContext pc;
const struct TEH_DenominationKey *dk;
struct TALER_CoinPubHash c_hash;
- void *coin_ev;
- size_t coin_ev_size;
MHD_RESULT mret;
/* check denomination exists and is in recoup mode */
@@ -442,28 +440,30 @@ verify_and_execute_recoup (
NULL);
}
}
- TALER_coin_pub_hash (&coin->coin_pub,
- &c_hash);
- GNUNET_assert (dk->denom_pub.cipher ==
- TALER_DENOMINATION_RSA);
- // FIXME-RSA migration...
- if (GNUNET_YES !=
- TALER_rsa_blind (&c_hash,
- &coin_bks->rsa_bks,
- dk->denom_pub.details.rsa_public_key,
- &coin_ev,
- &coin_ev_size))
+
{
- GNUNET_break (0);
- return TALER_MHD_reply_with_error (connection,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_EXCHANGE_RECOUP_BLINDING_FAILED,
- NULL);
+ void *coin_ev;
+ size_t coin_ev_size;
+
+ if (GNUNET_OK !=
+ TALER_denom_blind (&dk->denom_pub,
+ coin_bks,
+ &coin->coin_pub,
+ &c_hash,
+ &coin_ev,
+ &coin_ev_size))
+ {
+ GNUNET_break (0);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_EXCHANGE_RECOUP_BLINDING_FAILED,
+ NULL);
+ }
+ TALER_coin_ev_hash (coin_ev,
+ coin_ev_size,
+ &pc.h_blind);
+ GNUNET_free (coin_ev);
}
- TALER_coin_ev_hash (coin_ev,
- coin_ev_size,
- &pc.h_blind);
- GNUNET_free (coin_ev);
/* Perform actual recoup transaction */
pc.coin_sig = coin_sig;