diff options
Diffstat (limited to 'src/restclient/anastasis_api_truth_store.c')
-rw-r--r-- | src/restclient/anastasis_api_truth_store.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/src/restclient/anastasis_api_truth_store.c b/src/restclient/anastasis_api_truth_store.c index ef6a642..3311bc4 100644 --- a/src/restclient/anastasis_api_truth_store.c +++ b/src/restclient/anastasis_api_truth_store.c | |||
@@ -295,25 +295,20 @@ ANASTASIS_truth_store ( | |||
295 | { | 295 | { |
296 | json_t *truth_data; | 296 | json_t *truth_data; |
297 | 297 | ||
298 | truth_data = json_pack ("{s:o," /* encrypted KeyShare */ | 298 | truth_data = GNUNET_JSON_PACK ( |
299 | " s:s," /* type */ | 299 | GNUNET_JSON_pack_data_auto ("keyshare_data", |
300 | " s:o," /* nonce */ | 300 | encrypted_keyshare), |
301 | " s:s," /* truth_mime */ | 301 | GNUNET_JSON_pack_string ("type", |
302 | " s:I}", /* payment years */ | 302 | type), |
303 | "keyshare_data", | 303 | GNUNET_JSON_pack_data_varsize ("encrypted_truth", |
304 | GNUNET_JSON_from_data_auto (encrypted_keyshare), | 304 | encrypted_truth, |
305 | "type", | 305 | encrypted_truth_size), |
306 | type, | 306 | GNUNET_JSON_pack_string ("truth_mime", |
307 | "encrypted_truth", | 307 | (NULL != truth_mime) |
308 | GNUNET_JSON_from_data (encrypted_truth, | 308 | ? truth_mime |
309 | encrypted_truth_size), | 309 | : ""), |
310 | "truth_mime", | 310 | GNUNET_JSON_pack_uint64 ("storage_duration_years", |
311 | (NULL != truth_mime) | 311 | payment_years_requested)); |
312 | ? truth_mime | ||
313 | : "", | ||
314 | "storage_duration_years", | ||
315 | (json_int_t) payment_years_requested); | ||
316 | GNUNET_assert (NULL != truth_data); | ||
317 | json_str = json_dumps (truth_data, | 312 | json_str = json_dumps (truth_data, |
318 | JSON_COMPACT); | 313 | JSON_COMPACT); |
319 | GNUNET_assert (NULL != json_str); | 314 | GNUNET_assert (NULL != json_str); |