summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_db.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-24 20:13:31 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-24 20:13:31 +0200
commit32bb3b14bf5cd623714985c8ca7fed0c5a923336 (patch)
tree2438cf9567c4eb755ae6d8882383395fd23e408e /src/exchange/taler-exchange-httpd_db.c
parent8c3ffbf2a356b7c684bb65b8678e819183e52d76 (diff)
downloadexchange-32bb3b14bf5cd623714985c8ca7fed0c5a923336.tar.gz
exchange-32bb3b14bf5cd623714985c8ca7fed0c5a923336.tar.bz2
exchange-32bb3b14bf5cd623714985c8ca7fed0c5a923336.zip
fix #4483
Diffstat (limited to 'src/exchange/taler-exchange-httpd_db.c')
-rw-r--r--src/exchange/taler-exchange-httpd_db.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c
index 981c97289..7e3ce0a44 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -1248,31 +1248,23 @@ check_commitment (struct MHD_Connection *connection,
for (j = 0; j < num_newcoins; j++)
{
- struct TALER_RefreshLinkDecrypted *link_data;
+ struct TALER_RefreshLinkDecryptedP link_data;
struct TALER_CoinSpendPublicKeyP coin_pub;
struct GNUNET_HashCode h_msg;
char *buf;
size_t buf_len;
-
- link_data = TALER_refresh_decrypt (commit_coins[j].refresh_link,
- &shared_secret);
- if (NULL == link_data)
- {
- GNUNET_break (0);
- GNUNET_free (commit_coins);
- return (MHD_YES == TMH_RESPONSE_reply_internal_error (connection,
- "Decryption error"))
- ? GNUNET_NO : GNUNET_SYSERR;
- }
-
- GNUNET_CRYPTO_eddsa_key_get_public (&link_data->coin_priv.eddsa_priv,
+
+ TALER_refresh_decrypt (&commit_coins[j].refresh_link,
+ &shared_secret,
+ &link_data);
+ GNUNET_CRYPTO_eddsa_key_get_public (&link_data.coin_priv.eddsa_priv,
&coin_pub.eddsa_pub);
GNUNET_CRYPTO_hash (&coin_pub,
sizeof (struct TALER_CoinSpendPublicKeyP),
&h_msg);
if (0 == (buf_len =
GNUNET_CRYPTO_rsa_blind (&h_msg,
- link_data->blinding_key.rsa_blinding_key,
+ &link_data.blinding_key.bks,
denom_pubs[j].rsa_public_key,
&buf)))
{
@@ -1283,7 +1275,7 @@ check_commitment (struct MHD_Connection *connection,
"Blinding error"))
? GNUNET_NO : GNUNET_SYSERR;
}
-
+
if ( (buf_len != commit_coins[j].coin_ev_size) ||
(0 != memcmp (buf,
commit_coins[j].coin_ev,