diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-09 13:07:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-09 13:07:27 +0100 |
commit | ce8272446eebebb73cbab8ab4e388a2ec7e164fd (patch) | |
tree | 3b3e12a9cfc2de2225341fe5e271413aa4efb743 | |
parent | e4e8fe6c7c57305e3d2118b81c186ded6c6b1f3c (diff) |
actually include purpose payload in sig
-rw-r--r-- | src/mint/taler-mint-httpd_responses.c | 1 | ||||
-rw-r--r-- | src/util/json.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c index 9af372995..995f46bb8 100644 --- a/src/mint/taler-mint-httpd_responses.c +++ b/src/mint/taler-mint-httpd_responses.c @@ -574,7 +574,6 @@ TALER_MINT_reply_withdraw_sign_success (struct MHD_Connection *connection, char *sig_buf; int ret; - /* FIXME: use TALER_JSON_from_eddsa_sig here instead!? */ sig_buf_size = GNUNET_CRYPTO_rsa_signature_encode (collectable->sig, &sig_buf); sig_json = TALER_JSON_from_data (sig_buf, diff --git a/src/util/json.c b/src/util/json.c index 38f459200..88d9cd0c9 100644 --- a/src/util/json.c +++ b/src/util/json.c @@ -104,6 +104,10 @@ TALER_JSON_from_eddsa_sig (const struct GNUNET_CRYPTO_EccSignaturePurpose *purpo el = json_integer ((json_int_t) ntohl (purpose->purpose)); 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, sizeof (struct GNUNET_CRYPTO_EddsaSignature)); 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)); 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, sizeof (struct GNUNET_CRYPTO_EddsaSignature)); json_object_set_new (root, "ecdsa-sig", el); |