summaryrefslogtreecommitdiff
path: root/src/exchangedb/perf_taler_exchangedb_init.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-04-01 20:18:18 +0200
committerChristian Grothoff <christian@grothoff.org>2016-04-01 20:18:18 +0200
commit4154e41a411df9d30ab0213a7409642c924e78b0 (patch)
tree70de2d1918f40dc4d6421e2c271c08672baa430a /src/exchangedb/perf_taler_exchangedb_init.c
parent9bc96506bb6441467c6558f5252e803c4292c9fe (diff)
downloadexchange-4154e41a411df9d30ab0213a7409642c924e78b0.tar.gz
exchange-4154e41a411df9d30ab0213a7409642c924e78b0.tar.bz2
exchange-4154e41a411df9d30ab0213a7409642c924e78b0.zip
hash inputs to sign_fdh functions as required by new API
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);