From b05a5acc3cb737f9a06fcd6939f853c132de3714 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 27 Jan 2015 18:52:56 +0100 Subject: mint-httpd_withdraw compiles again --- src/mint/taler-mint-httpd_deposit.c | 4 +--- src/mint/taler-mint-httpd_keys.c | 9 +++++++-- src/mint/taler-mint-httpd_withdraw.c | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src/mint') diff --git a/src/mint/taler-mint-httpd_deposit.c b/src/mint/taler-mint-httpd_deposit.c index 6eeb3bff1..4a3713c5b 100644 --- a/src/mint/taler-mint-httpd_deposit.c +++ b/src/mint/taler-mint-httpd_deposit.c @@ -157,9 +157,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection, if (GNUNET_NO == res) return MHD_YES; /* failure */ - deposit->purpose.purpose = htonl (purpose); - deposit->purpose.size = htonl (sizeof (struct Deposit) - - offsetof (struct Deposit, purpose)); + // deposit->purpose = htonl (purpose); // FIXME... res = verify_and_execute_deposit (connection, deposit); TALER_MINT_release_parsed_data (spec); diff --git a/src/mint/taler-mint-httpd_keys.c b/src/mint/taler-mint-httpd_keys.c index 24851575a..28924baef 100644 --- a/src/mint/taler-mint-httpd_keys.c +++ b/src/mint/taler-mint-httpd_keys.c @@ -357,7 +357,7 @@ TALER_MINT_get_denom_key (const struct MintKeyState *key_state, size_t buf_len; buf_len = GNUNET_CRYPTO_rsa_public_key_encode (denom_pub, - *buf); + &buf); GNUNET_CRYPTO_hash (buf, buf_len, &hash); @@ -382,10 +382,15 @@ TALER_MINT_test_coin_valid (const struct MintKeyState *key_state, struct TALER_CoinPublicInfo *coin_public_info) { struct TALER_MINT_DenomKeyIssuePriv *dki; + struct GNUNET_HashCode c_hash; - dki = TALER_MINT_get_denom_key (key_state, &coin_public_info->denom_pub); + dki = TALER_MINT_get_denom_key (key_state, coin_public_info->denom_pub); if (NULL == dki) return GNUNET_NO; + /* FIXME: we had envisioned a more complex scheme... */ + GNUNET_CRYPTO_hash (&coin_public_info->coin_pub, + sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey), + &c_hash); if (GNUNET_OK != GNUNET_CRYPTO_rsa_verify (&c_hash, coin_public_info->denom_sig, diff --git a/src/mint/taler-mint-httpd_withdraw.c b/src/mint/taler-mint-httpd_withdraw.c index 1cf410910..7b7066f80 100644 --- a/src/mint/taler-mint-httpd_withdraw.c +++ b/src/mint/taler-mint-httpd_withdraw.c @@ -98,7 +98,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh, size_t denomination_pub_data_size; char *blinded_msg; size_t blinded_msg_len; - const struct GNUNET_CRYPTO_EddsaSignature signature; + struct GNUNET_CRYPTO_EddsaSignature signature; res = TALER_MINT_mhd_request_arg_data (connection, "reserve_pub", @@ -112,7 +112,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh, /* FIXME: handle variable-size signing keys! */ res = TALER_MINT_mhd_request_var_arg_data (connection, "denom_pub", - &denomination_pub_data, + (void **) &denomination_pub_data, &denomination_pub_data_size); if (GNUNET_SYSERR == res) return MHD_NO; /* internal error */ @@ -120,7 +120,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh, return MHD_YES; /* invalid request */ res = TALER_MINT_mhd_request_var_arg_data (connection, "coin_ev", - &blinded_msg, + (void **) &blinded_msg, &blinded_msg_len); if (GNUNET_SYSERR == res) return MHD_NO; /* internal error */ @@ -137,7 +137,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh, /* verify signature! */ wsrd.purpose.size = htonl (sizeof (struct TALER_WithdrawRequest)); - wsrd.purpose.type = htonl (TALER_SIGNATURE_WITHDRAW); + wsrd.purpose.purpose = htonl (TALER_SIGNATURE_WITHDRAW); GNUNET_CRYPTO_hash (denomination_pub_data, denomination_pub_data_size, &wsrd.h_denomination_pub); -- cgit v1.2.3