aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd_responses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint/taler-mint-httpd_responses.c')
-rw-r--r--src/mint/taler-mint-httpd_responses.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index eca10344a..89d79b362 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -306,26 +306,23 @@ TALER_MINT_reply_refresh_melt_success (struct MHD_Connection *connection,
306 json_t *root; 306 json_t *root;
307 json_t *list; 307 json_t *list;
308 struct GNUNET_HashContext *hash_context; 308 struct GNUNET_HashContext *hash_context;
309 struct RefreshMeltResponseSignatureBody body;
310 struct GNUNET_CRYPTO_EddsaSignature sig;
311 json_t *sig_json;
309 312
310 root = json_object (); 313 root = json_object ();
311 list = json_array (); 314 list = json_array ();
312 json_object_set_new (root, "blind_session_pubs", list); 315 json_object_set_new (root, "blind_session_pubs", list);
313 hash_context = GNUNET_CRYPTO_hash_context_start (); 316 hash_context = GNUNET_CRYPTO_hash_context_start ();
314 317 body.purpose.size = htonl (sizeof (struct RefreshMeltResponseSignatureBody));
315 { 318 body.purpose.purpose = htonl (TALER_SIGNATURE_REFRESH_MELT_RESPONSE);
316 struct RefreshMeltResponseSignatureBody body; 319 /* FIXME: should we not add something to the hash_context in the meantime? */
317 struct GNUNET_CRYPTO_EddsaSignature sig; 320 GNUNET_CRYPTO_hash_context_finish (hash_context, &body.melt_response_hash);
318 json_t *sig_json; 321 TALER_MINT_keys_sign (&body.purpose,
319 322 &sig);
320 body.purpose.size = htonl (sizeof (struct RefreshMeltResponseSignatureBody)); 323 sig_json = TALER_JSON_from_sig (&body.purpose, &sig);
321 body.purpose.purpose = htonl (TALER_SIGNATURE_REFRESH_MELT_RESPONSE); 324 GNUNET_assert (NULL != sig_json);
322 GNUNET_CRYPTO_hash_context_finish (hash_context, &body.melt_response_hash); 325 json_object_set (root, "signature", sig_json);
323 TALER_MINT_keys_sign (&body.purpose,
324 &sig);
325 sig_json = TALER_JSON_from_sig (&body.purpose, &sig);
326 GNUNET_assert (NULL != sig_json);
327 json_object_set (root, "signature", sig_json);
328 }
329 326
330 return TALER_MINT_reply_json (connection, 327 return TALER_MINT_reply_json (connection,
331 root, 328 root,