aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-01-27 18:52:56 +0100
committerChristian Grothoff <christian@grothoff.org>2015-01-27 18:52:56 +0100
commitb05a5acc3cb737f9a06fcd6939f853c132de3714 (patch)
treec466642d90edfda6bd03266ba3c71eadfd2b2598
parent019af0919e3fbe2f831f92728fd95eb7ea505da9 (diff)
downloadexchange-b05a5acc3cb737f9a06fcd6939f853c132de3714.tar.gz
exchange-b05a5acc3cb737f9a06fcd6939f853c132de3714.zip
mint-httpd_withdraw compiles again
-rw-r--r--src/mint/taler-mint-httpd_deposit.c4
-rw-r--r--src/mint/taler-mint-httpd_keys.c9
-rw-r--r--src/mint/taler-mint-httpd_withdraw.c8
3 files changed, 12 insertions, 9 deletions
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,
157 if (GNUNET_NO == res) 157 if (GNUNET_NO == res)
158 return MHD_YES; /* failure */ 158 return MHD_YES; /* failure */
159 159
160 deposit->purpose.purpose = htonl (purpose); 160 // deposit->purpose = htonl (purpose); // FIXME...
161 deposit->purpose.size = htonl (sizeof (struct Deposit)
162 - offsetof (struct Deposit, purpose));
163 res = verify_and_execute_deposit (connection, 161 res = verify_and_execute_deposit (connection,
164 deposit); 162 deposit);
165 TALER_MINT_release_parsed_data (spec); 163 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,
357 size_t buf_len; 357 size_t buf_len;
358 358
359 buf_len = GNUNET_CRYPTO_rsa_public_key_encode (denom_pub, 359 buf_len = GNUNET_CRYPTO_rsa_public_key_encode (denom_pub,
360 *buf); 360 &buf);
361 GNUNET_CRYPTO_hash (buf, 361 GNUNET_CRYPTO_hash (buf,
362 buf_len, 362 buf_len,
363 &hash); 363 &hash);
@@ -382,10 +382,15 @@ TALER_MINT_test_coin_valid (const struct MintKeyState *key_state,
382 struct TALER_CoinPublicInfo *coin_public_info) 382 struct TALER_CoinPublicInfo *coin_public_info)
383{ 383{
384 struct TALER_MINT_DenomKeyIssuePriv *dki; 384 struct TALER_MINT_DenomKeyIssuePriv *dki;
385 struct GNUNET_HashCode c_hash;
385 386
386 dki = TALER_MINT_get_denom_key (key_state, &coin_public_info->denom_pub); 387 dki = TALER_MINT_get_denom_key (key_state, coin_public_info->denom_pub);
387 if (NULL == dki) 388 if (NULL == dki)
388 return GNUNET_NO; 389 return GNUNET_NO;
390 /* FIXME: we had envisioned a more complex scheme... */
391 GNUNET_CRYPTO_hash (&coin_public_info->coin_pub,
392 sizeof (struct GNUNET_CRYPTO_EcdsaPublicKey),
393 &c_hash);
389 if (GNUNET_OK != 394 if (GNUNET_OK !=
390 GNUNET_CRYPTO_rsa_verify (&c_hash, 395 GNUNET_CRYPTO_rsa_verify (&c_hash,
391 coin_public_info->denom_sig, 396 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,
98 size_t denomination_pub_data_size; 98 size_t denomination_pub_data_size;
99 char *blinded_msg; 99 char *blinded_msg;
100 size_t blinded_msg_len; 100 size_t blinded_msg_len;
101 const struct GNUNET_CRYPTO_EddsaSignature signature; 101 struct GNUNET_CRYPTO_EddsaSignature signature;
102 102
103 res = TALER_MINT_mhd_request_arg_data (connection, 103 res = TALER_MINT_mhd_request_arg_data (connection,
104 "reserve_pub", 104 "reserve_pub",
@@ -112,7 +112,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
112 /* FIXME: handle variable-size signing keys! */ 112 /* FIXME: handle variable-size signing keys! */
113 res = TALER_MINT_mhd_request_var_arg_data (connection, 113 res = TALER_MINT_mhd_request_var_arg_data (connection,
114 "denom_pub", 114 "denom_pub",
115 &denomination_pub_data, 115 (void **) &denomination_pub_data,
116 &denomination_pub_data_size); 116 &denomination_pub_data_size);
117 if (GNUNET_SYSERR == res) 117 if (GNUNET_SYSERR == res)
118 return MHD_NO; /* internal error */ 118 return MHD_NO; /* internal error */
@@ -120,7 +120,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
120 return MHD_YES; /* invalid request */ 120 return MHD_YES; /* invalid request */
121 res = TALER_MINT_mhd_request_var_arg_data (connection, 121 res = TALER_MINT_mhd_request_var_arg_data (connection,
122 "coin_ev", 122 "coin_ev",
123 &blinded_msg, 123 (void **) &blinded_msg,
124 &blinded_msg_len); 124 &blinded_msg_len);
125 if (GNUNET_SYSERR == res) 125 if (GNUNET_SYSERR == res)
126 return MHD_NO; /* internal error */ 126 return MHD_NO; /* internal error */
@@ -137,7 +137,7 @@ TALER_MINT_handler_withdraw_sign (struct RequestHandler *rh,
137 137
138 /* verify signature! */ 138 /* verify signature! */
139 wsrd.purpose.size = htonl (sizeof (struct TALER_WithdrawRequest)); 139 wsrd.purpose.size = htonl (sizeof (struct TALER_WithdrawRequest));
140 wsrd.purpose.type = htonl (TALER_SIGNATURE_WITHDRAW); 140 wsrd.purpose.purpose = htonl (TALER_SIGNATURE_WITHDRAW);
141 GNUNET_CRYPTO_hash (denomination_pub_data, 141 GNUNET_CRYPTO_hash (denomination_pub_data,
142 denomination_pub_data_size, 142 denomination_pub_data_size,
143 &wsrd.h_denomination_pub); 143 &wsrd.h_denomination_pub);