aboutsummaryrefslogtreecommitdiff
path: root/src/mint
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-08-11 16:53:04 +0200
committerChristian Grothoff <christian@grothoff.org>2015-08-11 16:53:04 +0200
commit563b30bbfb6869679f74bdd731367210d19e3c47 (patch)
treed4c5470dfdc046afe809b231094215ba24df6f5e /src/mint
parent3662be1bac9c65756c2edf419b9ad55c045a668f (diff)
finishing taler-mint-sepa
Diffstat (limited to 'src/mint')
-rw-r--r--src/mint/taler-mint-httpd_wire.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mint/taler-mint-httpd_wire.c b/src/mint/taler-mint-httpd_wire.c
index cf177f8bc..ee3b4ff0b 100644
--- a/src/mint/taler-mint-httpd_wire.c
+++ b/src/mint/taler-mint-httpd_wire.c
@@ -22,7 +22,7 @@
#include "taler-mint-httpd_keystate.h"
#include "taler-mint-httpd_responses.h"
#include "taler-mint-httpd_wire.h"
-
+#include <jansson.h>
/**
* Handle a "/wire" request.
@@ -44,6 +44,7 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh,
struct TALER_MintWireSupportMethodsPS wsm;
struct TALER_MintPublicKeyP pub;
struct TALER_MintSignatureP sig;
+ json_t *methods;
wsm.purpose.size = htonl (sizeof (wsm));
wsm.purpose.purpose = htonl (TALER_SIGNATURE_MINT_WIRE_TYPES);
@@ -53,11 +54,17 @@ TMH_WIRE_handler_wire (struct TMH_RequestHandler *rh,
TMH_KS_sign (&wsm.purpose,
&pub,
&sig);
- /* FIXME: check against spec! */
+ methods = json_array ();
+ /* NOTE: for now, we only support *ONE* wire format per
+ mint instance; if we supply multiple, we need to
+ add the strings for each type separately here -- and
+ hash the 0-terminated strings above differently as well... */
+ json_array_append_new (methods,
+ json_string (TMH_expected_wire_format));
return TMH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_OK,
"{s:s, s:o, s:o}",
- "wire", TMH_expected_wire_format,
+ "methods", methods,
"sig", TALER_json_from_data (&sig,
sizeof (sig)),
"pub", TALER_json_from_data (&pub,