mint-httpd_withdraw compiles again
This commit is contained in:
parent
019af0919e
commit
b05a5acc3c
@ -157,9 +157,7 @@ parse_and_handle_deposit_request (struct MHD_Connection *connection,
|
|||||||
if (GNUNET_NO == res)
|
if (GNUNET_NO == res)
|
||||||
return MHD_YES; /* failure */
|
return MHD_YES; /* failure */
|
||||||
|
|
||||||
deposit->purpose.purpose = htonl (purpose);
|
// deposit->purpose = htonl (purpose); // FIXME...
|
||||||
deposit->purpose.size = htonl (sizeof (struct Deposit)
|
|
||||||
- offsetof (struct Deposit, purpose));
|
|
||||||
res = verify_and_execute_deposit (connection,
|
res = verify_and_execute_deposit (connection,
|
||||||
deposit);
|
deposit);
|
||||||
TALER_MINT_release_parsed_data (spec);
|
TALER_MINT_release_parsed_data (spec);
|
||||||
|
@ -357,7 +357,7 @@ TALER_MINT_get_denom_key (const struct MintKeyState *key_state,
|
|||||||
size_t buf_len;
|
size_t buf_len;
|
||||||
|
|
||||||
buf_len = GNUNET_CRYPTO_rsa_public_key_encode (denom_pub,
|
buf_len = GNUNET_CRYPTO_rsa_public_key_encode (denom_pub,
|
||||||
*buf);
|
&buf);
|
||||||
GNUNET_CRYPTO_hash (buf,
|
GNUNET_CRYPTO_hash (buf,
|
||||||
buf_len,
|
buf_len,
|
||||||
&hash);
|
&hash);
|
||||||
@ -382,10 +382,15 @@ TALER_MINT_test_coin_valid (const struct MintKeyState *key_state,
|
|||||||
struct TALER_CoinPublicInfo *coin_public_info)
|
struct TALER_CoinPublicInfo *coin_public_info)
|
||||||
{
|
{
|
||||||
struct TALER_MINT_DenomKeyIssuePriv *dki;
|
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)
|
if (NULL == dki)
|
||||||
return GNUNET_NO;
|
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 !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CRYPTO_rsa_verify (&c_hash,
|
GNUNET_CRYPTO_rsa_verify (&c_hash,
|
||||||
coin_public_info->denom_sig,
|
coin_public_info->denom_sig,
|
||||||
|
@ -98,7 +98,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
|
|||||||
size_t denomination_pub_data_size;
|
size_t denomination_pub_data_size;
|
||||||
char *blinded_msg;
|
char *blinded_msg;
|
||||||
size_t blinded_msg_len;
|
size_t blinded_msg_len;
|
||||||
const struct GNUNET_CRYPTO_EddsaSignature signature;
|
struct GNUNET_CRYPTO_EddsaSignature signature;
|
||||||
|
|
||||||
res = TALER_MINT_mhd_request_arg_data (connection,
|
res = TALER_MINT_mhd_request_arg_data (connection,
|
||||||
"reserve_pub",
|
"reserve_pub",
|
||||||
@ -112,7 +112,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
|
|||||||
/* FIXME: handle variable-size signing keys! */
|
/* FIXME: handle variable-size signing keys! */
|
||||||
res = TALER_MINT_mhd_request_var_arg_data (connection,
|
res = TALER_MINT_mhd_request_var_arg_data (connection,
|
||||||
"denom_pub",
|
"denom_pub",
|
||||||
&denomination_pub_data,
|
(void **) &denomination_pub_data,
|
||||||
&denomination_pub_data_size);
|
&denomination_pub_data_size);
|
||||||
if (GNUNET_SYSERR == res)
|
if (GNUNET_SYSERR == res)
|
||||||
return MHD_NO; /* internal error */
|
return MHD_NO; /* internal error */
|
||||||
@ -120,7 +120,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
|
|||||||
return MHD_YES; /* invalid request */
|
return MHD_YES; /* invalid request */
|
||||||
res = TALER_MINT_mhd_request_var_arg_data (connection,
|
res = TALER_MINT_mhd_request_var_arg_data (connection,
|
||||||
"coin_ev",
|
"coin_ev",
|
||||||
&blinded_msg,
|
(void **) &blinded_msg,
|
||||||
&blinded_msg_len);
|
&blinded_msg_len);
|
||||||
if (GNUNET_SYSERR == res)
|
if (GNUNET_SYSERR == res)
|
||||||
return MHD_NO; /* internal error */
|
return MHD_NO; /* internal error */
|
||||||
@ -137,7 +137,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
|
|||||||
|
|
||||||
/* verify signature! */
|
/* verify signature! */
|
||||||
wsrd.purpose.size = htonl (sizeof (struct TALER_WithdrawRequest));
|
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,
|
GNUNET_CRYPTO_hash (denomination_pub_data,
|
||||||
denomination_pub_data_size,
|
denomination_pub_data_size,
|
||||||
&wsrd.h_denomination_pub);
|
&wsrd.h_denomination_pub);
|
||||||
|
Loading…
Reference in New Issue
Block a user