aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-08-09 21:24:36 +0200
committerChristian Grothoff <christian@grothoff.org>2015-08-09 21:24:36 +0200
commit0140dd818b226f13d5cc126bed62442922561c2a (patch)
treeba6b95fd30ebd1f8e297fd2cf8204bc27d71864b /src
parentcd4018e61a7e6abea2ba2620376a8e5590a77c22 (diff)
fix missing bits from session hash calculation
Diffstat (limited to 'src')
-rw-r--r--src/mint-lib/mint_api_refresh.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/mint-lib/mint_api_refresh.c b/src/mint-lib/mint_api_refresh.c
index 36c19a16e..796eb23fb 100644
--- a/src/mint-lib/mint_api_refresh.c
+++ b/src/mint-lib/mint_api_refresh.c
@@ -986,6 +986,27 @@ TALER_MINT_refresh_prepare (unsigned int num_melts,
GNUNET_free (link_enc);
}
}
+ for (i = 0; i < TALER_CNC_KAPPA; i++)
+ {
+ for (j = 0; j < num_melts; j++)
+ {
+ struct TALER_MINTDB_RefreshCommitLinkP rcl;
+ struct TALER_TransferSecretP trans_sec;
+
+ GNUNET_CRYPTO_ecdhe_key_get_public (&md.melted_coins[j].transfer_priv[i].ecdhe_priv,
+ &rcl.transfer_pub.ecdhe_pub);
+ TALER_link_derive_transfer_secret (&melt_privs[j],
+ &md.melted_coins[j].transfer_priv[i],
+ &trans_sec);
+ TALER_transfer_encrypt (&md.link_secrets[i],
+ &trans_sec,
+ &rcl.shared_secret_enc);
+ GNUNET_CRYPTO_hash_context_read (hash_context,
+ &rcl,
+ sizeof (struct TALER_MINTDB_RefreshCommitLinkP));
+ }
+ }
+
GNUNET_CRYPTO_hash_context_finish (hash_context,
&md.melt_session_hash);
@@ -1351,9 +1372,6 @@ melted_coin_to_json (const struct GNUNET_HashCode *melt_session_hash,
GNUNET_CRYPTO_eddsa_sign (&mc->coin_priv.eddsa_priv,
&melt.purpose,
&confirm_sig.eddsa_signature);
- fprintf (stderr,
- "Signing hash %s\n",
- GNUNET_h2s (melt_session_hash));
return json_pack ("{s:o, s:o, s:o, s:o, s:o}",
"coin_pub",
TALER_json_from_data (&melt.coin_pub,
@@ -1544,7 +1562,7 @@ TALER_MINT_refresh_melt (struct TALER_MINT_Handle *mint,
&coin_hash);
coin_ev_size = GNUNET_CRYPTO_rsa_blind (&coin_hash,
fc->blinding_key.rsa_blinding_key,
- md->fresh_pks[j].rsa_public_key,
+ md->fresh_pks[i].rsa_public_key,
&coin_ev);
json_array_append (tmp,
TALER_json_from_data (coin_ev,