summaryrefslogtreecommitdiff
path: root/src/exchangedb/perf_taler_exchangedb_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/perf_taler_exchangedb_init.c')
-rw-r--r--src/exchangedb/perf_taler_exchangedb_init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c
index 8036d8597..c669518ad 100644
--- a/src/exchangedb/perf_taler_exchangedb_init.c
+++ b/src/exchangedb/perf_taler_exchangedb_init.c
@@ -335,6 +335,7 @@ PERF_TALER_EXCHANGEDB_coin_init (
{
struct PERF_TALER_EXCHANGEDB_Coin *coin;
struct GNUNET_CRYPTO_EddsaPrivateKey *priv;
+ struct GNUNET_HashCode hc;
coin = GNUNET_new (struct PERF_TALER_EXCHANGEDB_Coin);
GNUNET_assert (NULL != coin);
@@ -350,11 +351,12 @@ PERF_TALER_EXCHANGEDB_coin_init (
&coin->public_info.coin_pub.eddsa_pub);
coin->public_info.denom_pub.rsa_public_key =
GNUNET_CRYPTO_rsa_public_key_dup (dki->denom_pub.rsa_public_key);
- // This is broken at the moment because it needs to be a hash of a coin public key.
+ GNUNET_CRYPTO_hash (&coin->public_info.coin_pub,
+ sizeof (struct TALER_CoinSpendPublicKeyP),
+ &hc);
coin->public_info.denom_sig.rsa_signature =
GNUNET_CRYPTO_rsa_sign_fdh (dki->denom_priv.rsa_private_key,
- &coin->public_info.coin_pub,
- sizeof (struct TALER_CoinSpendPublicKeyP));
+ &hc);
GNUNET_assert (NULL != coin->public_info.denom_pub.rsa_public_key);
GNUNET_assert (NULL != coin->public_info.denom_sig.rsa_signature);