aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_db.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_db.c')
-rw-r--r--src/mint/taler-mint-httpd_db.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mint/taler-mint-httpd_db.c b/src/mint/taler-mint-httpd_db.c
index df97db4f..74286827 100644
--- a/src/mint/taler-mint-httpd_db.c
+++ b/src/mint/taler-mint-httpd_db.c
@@ -776,8 +776,6 @@ check_commitment (struct MHD_Connection *connection,
unsigned int j;
struct TALER_LinkSecretP last_shared_secret;
int secret_initialized = GNUNET_NO;
- struct GNUNET_CRYPTO_EcdhePublicKey coin_ecdhe;
- struct GNUNET_CRYPTO_EcdhePrivateKey transfer_ecdhe;
struct TALER_MINTDB_RefreshCommitLinkP *commit_links;
struct TALER_MINTDB_RefreshCommitCoin *commit_coins;
@@ -803,8 +801,8 @@ check_commitment (struct MHD_Connection *connection,
struct TALER_LinkSecretP shared_secret;
struct TALER_TransferPublicKeyP transfer_pub_check;
- GNUNET_CRYPTO_ecdsa_key_get_public (&transfer_privs[j].ecdsa_priv,
- &transfer_pub_check.ecdsa_pub);
+ GNUNET_CRYPTO_ecdhe_key_get_public (&transfer_privs[j].ecdhe_priv,
+ &transfer_pub_check.ecdhe_pub);
if (0 !=
memcmp (&transfer_pub_check,
&commit_links[j].transfer_pub,
@@ -815,32 +813,26 @@ check_commitment (struct MHD_Connection *connection,
GNUNET_free (commit_links);
/* FIXME: return more specific error with original signature (#3712) */
return (MHD_YES ==
- TMH_RESPONSE_reply_refresh_reveal_missmatch (connection,
+ TMH_RESPONSE_reply_refresh_reveal_missmatch (connection,
off,
j,
"transfer key"))
- ? GNUNET_NO : GNUNET_SYSERR;
+ ? GNUNET_NO : GNUNET_SYSERR;
}
/* We're converting key types here, which is not very nice
* but necessary and harmless (keys will be thrown away later). */
- GNUNET_CRYPTO_ecdsa_public_to_ecdhe (&melts[j].coin.coin_pub.ecdsa_pub,
- &coin_ecdhe);
- GNUNET_CRYPTO_ecdsa_private_to_ecdhe (&transfer_privs[j].ecdsa_priv,
- &transfer_ecdhe);
if (GNUNET_OK !=
- GNUNET_CRYPTO_ecc_ecdh (&transfer_ecdhe,
- &coin_ecdhe,
+ GNUNET_CRYPTO_ecc_ecdh (&transfer_privs[j].ecdhe_priv,
+ &melts[j].coin.coin_pub.ecdhe_pub,
&transfer_secret.key))
{
GNUNET_break (0);
- GNUNET_CRYPTO_ecdhe_key_clear (&transfer_ecdhe);
GNUNET_free (commit_links);
return (MHD_YES == TMH_RESPONSE_reply_internal_error (connection,
"ECDH error"))
? GNUNET_NO : GNUNET_SYSERR;
}
- GNUNET_CRYPTO_ecdhe_key_clear (&transfer_ecdhe);
if (GNUNET_OK !=
TALER_transfer_decrypt (&commit_links[j].shared_secret_enc,
&transfer_secret,