summaryrefslogtreecommitdiff
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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mint/taler-mint-httpd_responses.c b/src/mint/taler-mint-httpd_responses.c
index 12d4bced7..432772d79 100644
--- a/src/mint/taler-mint-httpd_responses.c
+++ b/src/mint/taler-mint-httpd_responses.c
@@ -125,6 +125,26 @@ TALER_MINT_reply_arg_invalid (struct MHD_Connection *connection,
/**
+ * Send a response indicating an invalid coin. (I.e. the signature
+ * over the public key of the coin does not match a valid signing key
+ * of this mint).
+ *
+ * @param connection the MHD connection to use
+ * @return MHD result code
+ */
+int
+TALER_MINT_reply_coin_invalid (struct MHD_Connection *connection)
+{
+ /* TODO: may want to be more precise in the future and
+ distinguish bogus signatures from bogus public keys. */
+ return TALER_MINT_reply_json_pack (connection,
+ MHD_HTTP_NOT_FOUND,
+ "{s:s}",
+ "error", "Coin is not valid");
+}
+
+
+/**
* Send a response indicating a missing argument.
*
* @param connection the MHD connection to use