actually include purpose payload in sig

This commit is contained in:
Christian Grothoff 2015-03-09 13:07:27 +01:00
parent e4e8fe6c7c
commit ce8272446e
2 changed files with 8 additions and 1 deletions

View File

@ -574,7 +574,6 @@ TALER_MINT_reply_withdraw_sign_success (struct MHD_Connection *connection,
char *sig_buf; char *sig_buf;
int ret; int ret;
/* FIXME: use TALER_JSON_from_eddsa_sig here instead!? */
sig_buf_size = GNUNET_CRYPTO_rsa_signature_encode (collectable->sig, sig_buf_size = GNUNET_CRYPTO_rsa_signature_encode (collectable->sig,
&sig_buf); &sig_buf);
sig_json = TALER_JSON_from_data (sig_buf, sig_json = TALER_JSON_from_data (sig_buf,

View File

@ -104,6 +104,10 @@ TALER_JSON_from_eddsa_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpo
el = json_integer ((json_int_t) ntohl (purpose->purpose)); el = json_integer ((json_int_t) ntohl (purpose->purpose));
json_object_set_new (root, "purpose", el); json_object_set_new (root, "purpose", el);
el = TALER_JSON_from_data (purpose,
ntohl (purpose->size));
json_object_set_new (root, "eddsa-val", el);
el = TALER_JSON_from_data (signature, el = TALER_JSON_from_data (signature,
sizeof (struct GNUNET_CRYPTO_EddsaSignature)); sizeof (struct GNUNET_CRYPTO_EddsaSignature));
json_object_set_new (root, "eddsa-sig", el); json_object_set_new (root, "eddsa-sig", el);
@ -134,6 +138,10 @@ TALER_JSON_from_ecdsa_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpo
el = json_integer ((json_int_t) ntohl (purpose->purpose)); el = json_integer ((json_int_t) ntohl (purpose->purpose));
json_object_set_new (root, "purpose", el); json_object_set_new (root, "purpose", el);
el = TALER_JSON_from_data (purpose,
ntohl (purpose->size));
json_object_set_new (root, "ecdsa-val", el);
el = TALER_JSON_from_data (signature, el = TALER_JSON_from_data (signature,
sizeof (struct GNUNET_CRYPTO_EddsaSignature)); sizeof (struct GNUNET_CRYPTO_EddsaSignature));
json_object_set_new (root, "ecdsa-sig", el); json_object_set_new (root, "ecdsa-sig", el);