aboutsummaryrefslogtreecommitdiff
path: root/src/mint/taler-mint-httpd.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-30 21:25:16 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-30 21:25:16 +0200
commitc154e50148794f498259b835d9ac064660e769aa (patch)
treeff799a69203fc4362e00e5e00a583de97dec64e9 /src/mint/taler-mint-httpd.c
parent28a10c22a6a3d3883ad04cef5504905b3381c06f (diff)
downloadexchange-c154e50148794f498259b835d9ac064660e769aa.tar.xz
fix /test/rsa API to persist private RSA key and use it across requests and allow client to fetch it before requesting the signature
Diffstat (limited to 'src/mint/taler-mint-httpd.c')
-rw-r--r--src/mint/taler-mint-httpd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mint/taler-mint-httpd.c b/src/mint/taler-mint-httpd.c
index 51cb14c88..66d7e01e2 100644
--- a/src/mint/taler-mint-httpd.c
+++ b/src/mint/taler-mint-httpd.c
@@ -242,10 +242,17 @@ handle_mhd_request (void *cls,
"Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
- { "/test/rsa", MHD_HTTP_METHOD_POST, "application/json",
+ { "/test/rsa/get", MHD_HTTP_METHOD_GET, "application/json",
NULL, 0,
- &TMH_TEST_handler_test_rsa, MHD_HTTP_OK },
- { "/test/rsa", NULL, "text/plain",
+ &TMH_TEST_handler_test_rsa_get, MHD_HTTP_OK },
+ { "/test/rsa/get", NULL, "text/plain",
+ "Only GET is allowed", 0,
+ &TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },
+
+ { "/test/rsa/sign", MHD_HTTP_METHOD_POST, "application/json",
+ NULL, 0,
+ &TMH_TEST_handler_test_rsa_sign, MHD_HTTP_OK },
+ { "/test/rsa/sign", NULL, "text/plain",
"Only POST is allowed", 0,
&TMH_MHD_handler_send_json_pack_error, MHD_HTTP_METHOD_NOT_ALLOWED },