From 41e1dd9738a58ffce765d5f837c32962907707df Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 29 Jan 2015 17:34:37 +0100 Subject: finish cleanup of /refresh/commit parsing --- src/mint/mint_db.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/mint/mint_db.c') diff --git a/src/mint/mint_db.c b/src/mint/mint_db.c index 0e448bf09..5c52948e6 100644 --- a/src/mint/mint_db.c +++ b/src/mint/mint_db.c @@ -1109,14 +1109,8 @@ TALER_MINT_DB_get_refresh_commit_coin (PGconn *db_conn, GNUNET_free (rl_buf); return GNUNET_SYSERR; } - - rl = GNUNET_malloc (sizeof (struct TALER_RefreshLinkEncrypted) + - rl_buf_size - sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey)); - rl->blinding_key_enc = (const char *) &rl[1]; - rl->blinding_key_enc_size = rl_buf_size - sizeof (struct GNUNET_CRYPTO_EcdsaPrivateKey); - memcpy (rl->coin_priv_enc, - rl_buf, - rl_buf_size); + rl = TALER_refresh_link_encrypted_decode (rl_buf, + rl_buf_size); GNUNET_free (rl_buf); cc->refresh_link = rl; cc->coin_ev = c_buf; -- cgit v1.2.3