From 4154e41a411df9d30ab0213a7409642c924e78b0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Apr 2016 20:18:18 +0200 Subject: hash inputs to sign_fdh functions as required by new API --- src/exchangedb/perf_taler_exchangedb_init.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/exchangedb/perf_taler_exchangedb_init.c') diff --git a/src/exchangedb/perf_taler_exchangedb_init.c b/src/exchangedb/perf_taler_exchangedb_init.c index 8036d859..c669518a 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); -- cgit v1.2.3