commit 50dd030f07149531e960c45b536ab43bae9cdc40
parent 454a3fc3011b9674f1d1817d8eac9b2b3b534ad3
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date: Tue, 27 Feb 2024 19:36:15 +0100
handle get keys
Diffstat:
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/donau/donau-httpd.c b/src/donau/donau-httpd.c
@@ -466,7 +466,7 @@ handle_mhd_request (void *cls,
{
.url = "keys",
.method = MHD_HTTP_METHOD_GET,
- .handler.get = &DH_handler_keys
+ .handler.get = &DH_keys_get_handler
},
/* GET charities */
{
diff --git a/src/donau/donau-httpd.h b/src/donau/donau-httpd.h
@@ -235,4 +235,17 @@ struct DH_RequestHandler
bool nargs_is_upper_bound;
};
+/**
+ * Function to call to handle requests to "/keys" by sending
+ * back our current key material.
+ *
+ * @param rc request context
+ * @param args array of additional options (must be empty for this function)
+ * @return MHD result code
+ */
+MHD_RESULT
+DH_keys_get_handler (struct DH_RequestContext *rc,
+ const char *const args[]);
+
+
#endif
diff --git a/src/donau/donau-httpd_keys.c b/src/donau/donau-httpd_keys.c
@@ -19,6 +19,7 @@
* @author Christian Grothoff
* @author Özgür Kesim
* @author Pius Loosli
+ * @author Johannes Casaburi
*/
#include <taler/platform.h>
#include <taler/taler_json_lib.h>