From b13255de935bcf8869669e3b4a134894c9bd6c83 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 11 Feb 2024 17:06:04 +0100 Subject: this should fix #8056 (testing required) --- src/kyclogic/plugin_kyclogic_kycaid.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'src/kyclogic/plugin_kyclogic_kycaid.c') diff --git a/src/kyclogic/plugin_kyclogic_kycaid.c b/src/kyclogic/plugin_kyclogic_kycaid.c index 6c8ced55d..243ff7c34 100644 --- a/src/kyclogic/plugin_kyclogic_kycaid.c +++ b/src/kyclogic/plugin_kyclogic_kycaid.c @@ -1,6 +1,6 @@ /* This file is part of GNU Taler - Copyright (C) 2022, 2023 Taler Systems SA + Copyright (C) 2022--2024 Taler Systems SA Taler is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -25,6 +25,7 @@ #include "taler_mhd_lib.h" #include "taler_curl_lib.h" #include "taler_json_lib.h" +#include "taler_templating_lib.h" #include #include "taler_util.h" @@ -669,16 +670,30 @@ proof_reply (void *cls) { struct TALER_KYCLOGIC_ProofHandle *ph = cls; struct MHD_Response *resp; + enum GNUNET_GenericReturnValue ret; + json_t *body; + unsigned int http_status; - resp = TALER_MHD_make_error (TALER_EC_GENERIC_ENDPOINT_UNKNOWN, - "there is no '/kyc-proof' for kycaid"); + http_status = MHD_HTTP_BAD_REQUEST; + body = GNUNET_JSON_PACK ( + TALER_JSON_pack_ec (TALER_EC_GENERIC_ENDPOINT_UNKNOWN)); + GNUNET_assert (NULL != body); + ret = TALER_TEMPLATING_build (ph->connection, + &http_status, + "kycaid-invalid-request", + NULL, + NULL, + body, + &resp); + json_decref (body); + GNUNET_break (GNUNET_SYSERR != ret); ph->cb (ph->cb_cls, TALER_KYCLOGIC_STATUS_PROVIDER_FAILED, NULL, /* user id */ NULL, /* provider legi ID */ GNUNET_TIME_UNIT_ZERO_ABS, /* expiration */ NULL, /* attributes */ - MHD_HTTP_BAD_REQUEST, + http_status, resp); } -- cgit v1.2.3