summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-04-19 15:10:48 +0200
committerChristian Grothoff <christian@grothoff.org>2015-04-19 15:10:48 +0200
commit81e8a9b99cc380eb6798e51a4e55435206c63ffe (patch)
treefe4535d4c58706d4263e0a153f606c512b0c4aff /src
parentabe779ab7f8eee576f2c8e8acbf34a505d9bc6bf (diff)
downloadexchange-81e8a9b99cc380eb6798e51a4e55435206c63ffe.tar.gz
exchange-81e8a9b99cc380eb6798e51a4e55435206c63ffe.tar.bz2
exchange-81e8a9b99cc380eb6798e51a4e55435206c63ffe.zip
minor updates to /test api
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_signatures.h6
-rw-r--r--src/mint/taler-mint-httpd_test.c34
2 files changed, 18 insertions, 22 deletions
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index 9ef50d1d3..de6dbfc24 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -504,11 +504,7 @@ struct TALER_MintKeySetPS
struct GNUNET_TIME_AbsoluteNBO list_issue_date;
/**
- * Hash over the "inner" JSON with the key set. FIXME: The use of
- * JSON as what is being signed here is a bit of a hack, as the
- * result depends on the JSON indentation and being canonical.
- * We should consider using a more well-defined binary format to
- * sign. (#3739)
+ * Hash over the various denomination signing keys returned.
*/
struct GNUNET_HashCode hc;
};
diff --git a/src/mint/taler-mint-httpd_test.c b/src/mint/taler-mint-httpd_test.c
index fbd24660f..6bf11c33e 100644
--- a/src/mint/taler-mint-httpd_test.c
+++ b/src/mint/taler-mint-httpd_test.c
@@ -79,12 +79,11 @@ TMH_TEST_handler_test_base32 (struct TMH_RequestHandler *rh,
&hc);
TMH_PARSE_release_data (spec);
json_decref (json);
- json = TALER_json_from_data (&hc, sizeof (struct GNUNET_HashCode));
- res = TMH_RESPONSE_reply_json (connection,
- json,
- MHD_HTTP_OK);
- json_decref (json);
- return res;
+ return TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_OK,
+ "{s:o}",
+ "output",
+ TALER_json_from_data (&hc, sizeof (struct GNUNET_HashCode)));
}
@@ -160,11 +159,11 @@ TMH_TEST_handler_test_encrypt (struct TMH_RequestHandler *rh,
spec[0].destination_size_out);
GNUNET_free (out);
TMH_PARSE_release_data (spec);
- res = TMH_RESPONSE_reply_json (connection,
- json,
- MHD_HTTP_OK);
- json_decref (json);
- return res;
+ return TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_OK,
+ "{s:o}",
+ "output",
+ json);
}
@@ -221,12 +220,13 @@ TMH_TEST_handler_test_hkdf (struct TMH_RequestHandler *rh,
spec[0].destination_size_out,
NULL, 0);
TMH_PARSE_release_data (spec);
- json = TALER_json_from_data (&hc, sizeof (struct GNUNET_HashCode));
- res = TMH_RESPONSE_reply_json (connection,
- json,
- MHD_HTTP_OK);
- json_decref (json);
- return res;
+ json = TALER_json_from_data (&hc,
+ sizeof (struct GNUNET_HashCode));
+ return TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_OK,
+ "{s:o}",
+ "output",
+ json);
}