sort json keys; free string
This commit is contained in:
parent
a423fdb1d0
commit
e1d6c8eb3e
@ -656,7 +656,7 @@ print_transcript (uint32_t highestprice)
|
|||||||
// Add signature of seller to H(auction, bidders, signatures, transscript, result)
|
// Add signature of seller to H(auction, bidders, signatures, transscript, result)
|
||||||
{
|
{
|
||||||
struct GNUNET_CRYPTO_EddsaSignature sig;
|
struct GNUNET_CRYPTO_EddsaSignature sig;
|
||||||
char *root_js = json_dumps(root, JSON_COMPACT);
|
char *root_js = json_dumps(root, JSON_COMPACT|JSON_SORT_KEYS);
|
||||||
|
|
||||||
GNUNET_CRYPTO_hash(root_js,
|
GNUNET_CRYPTO_hash(root_js,
|
||||||
strlen(root_js),
|
strlen(root_js),
|
||||||
@ -673,6 +673,8 @@ print_transcript (uint32_t highestprice)
|
|||||||
root,
|
root,
|
||||||
"sig",
|
"sig",
|
||||||
GNUNET_JSON_from_data_auto(&sig)));
|
GNUNET_JSON_from_data_auto(&sig)));
|
||||||
|
|
||||||
|
free(root_js);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("%s\n", json_dumps (root, JSON_INDENT (2)));
|
printf ("%s\n", json_dumps (root, JSON_INDENT (2)));
|
||||||
|
Loading…
Reference in New Issue
Block a user