summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-11-17 11:30:33 +0100
committerChristian Grothoff <christian@grothoff.org>2021-11-17 11:30:33 +0100
commit16a8b2f6119a644a70f8b9885406fe4e9e2e1b46 (patch)
tree4e42544c74298be701c464c89e3300cd68583675
parentb7a35e0daa2a1e1b47810106b391e4a6d5016aa6 (diff)
downloadexchange-16a8b2f6119a644a70f8b9885406fe4e9e2e1b46.tar.gz
exchange-16a8b2f6119a644a70f8b9885406fe4e9e2e1b46.tar.bz2
exchange-16a8b2f6119a644a70f8b9885406fe4e9e2e1b46.zip
towards merging with master
-rw-r--r--src/util/taler-crypto-worker.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/util/taler-crypto-worker.c b/src/util/taler-crypto-worker.c
index e44809784..6e1455262 100644
--- a/src/util/taler-crypto-worker.c
+++ b/src/util/taler-crypto-worker.c
@@ -109,7 +109,7 @@ run (void *cls,
GNUNET_JSON_spec_fixed_auto ("sig",
&sig),
GNUNET_JSON_spec_varsize ("msg",
- &msg,
+ (void **) &msg,
&msg_size),
GNUNET_JSON_spec_end ()
};
@@ -148,19 +148,28 @@ run (void *cls,
uint32_t coin_index;
json_t *resp;
struct GNUNET_JSON_Specification eddsa_verify_spec[] = {
- GNUNET_JSON_spec_rsa_public_key ("denom_pub",
- &denom_pub.rsa_public_key),
- TALER_JSON_spec_amount_any ("fee_withdraw", &fee_withdraw),
- TALER_JSON_spec_amount_any ("value", &value),
- GNUNET_JSON_spec_fixed_auto ("reserve_pub", &reserve_pub),
- GNUNET_JSON_spec_fixed_auto ("reserve_priv", &reserve_priv),
- GNUNET_JSON_spec_uint32 ("coin_index", &coin_index),
+ TALER_JSON_spec_denom_pub ("denom_pub",
+ &denom_pub),
+ TALER_JSON_spec_amount_any ("fee_withdraw",
+ &fee_withdraw),
+ TALER_JSON_spec_amount_any ("value",
+ &value),
+ GNUNET_JSON_spec_fixed_auto ("reserve_pub",
+ &reserve_pub),
+ GNUNET_JSON_spec_fixed_auto ("reserve_priv",
+ &reserve_priv),
+ GNUNET_JSON_spec_uint32 ("coin_index",
+ &coin_index),
GNUNET_JSON_spec_end ()
};
- if (GNUNET_OK != GNUNET_JSON_parse (args,
- eddsa_verify_spec,
- NULL,
- NULL))
+ struct TALER_CoinSpendPublicKeyP coin_pub;
+ struct TALER_PlanchetSecretsP ps;
+
+ if (GNUNET_OK !=
+ GNUNET_JSON_parse (args,
+ eddsa_verify_spec,
+ NULL,
+ NULL))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"malformed op args\n");
@@ -168,9 +177,10 @@ run (void *cls,
return;
}
TALER_planchet_setup_refresh (&transfer_secret,
- coin_num_salt, &ps);
+ coin_num_salt,
+ &ps);
GNUNET_CRYPTO_eddsa_key_get_public (&ps.coin_priv.eddsa_priv,
- &coin_pub);
+ &coin_pub.eddsa_pub);
resp = GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("coin_priv", &ps.coin_priv),
@@ -211,7 +221,7 @@ run (void *cls,
TALER_planchet_setup_refresh (&transfer_secret,
coin_num_salt, &ps);
GNUNET_CRYPTO_eddsa_key_get_public (&ps.coin_priv.eddsa_priv,
- &coin_pub);
+ &coin_pub.eddsa_pub);
resp = GNUNET_JSON_PACK (
GNUNET_JSON_pack_data_auto ("coin_priv", &ps.coin_priv),