This commit is contained in:
Christian Grothoff 2023-01-20 15:20:51 +01:00
parent 56cdb7e9e6
commit c782615262
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -30,7 +30,6 @@
#include "taler-exchange-httpd_responses.h" #include "taler-exchange-httpd_responses.h"
MHD_RESULT MHD_RESULT
TEH_handler_management_post_aml_decision ( TEH_handler_management_post_aml_decision (
struct MHD_Connection *connection, struct MHD_Connection *connection,
@ -45,6 +44,7 @@ TEH_handler_management_post_aml_decision (
struct TALER_AmlOfficerPublicKeyP officer_pub; struct TALER_AmlOfficerPublicKeyP officer_pub;
struct TALER_AmlOfficerSignatureP officer_sig; struct TALER_AmlOfficerSignatureP officer_sig;
struct GNUNET_JSON_Specification spec[] = { struct GNUNET_JSON_Specification spec[] = {
// FIXME: officer_pub is in URL path, not in JSON body!
GNUNET_JSON_spec_fixed_auto ("officer_pub", GNUNET_JSON_spec_fixed_auto ("officer_pub",
&officer_pub), &officer_pub),
GNUNET_JSON_spec_fixed_auto ("officer_sig", GNUNET_JSON_spec_fixed_auto ("officer_sig",
@ -120,21 +120,21 @@ TEH_handler_management_post_aml_decision (
if (invalid_officer) if (invalid_officer)
{ {
return TALER_MHD_reply_with_error ( return TALER_MHD_reply_with_error (
connection, connection,
MHD_HTTP_FORBIDDEN, MHD_HTTP_FORBIDDEN,
TALER_EC_EXCHANGE_AML_DECISION_INVALID_OFFICER, TALER_EC_EXCHANGE_AML_DECISION_INVALID_OFFICER,
NULL); NULL);
} }
if (GNUNET_TIME_timestamp_cmp (last_date, if (GNUNET_TIME_timestamp_cmp (last_date,
>, >,
validity_start)) validity_start))
{ {
GNUNET_break_op (0); GNUNET_break_op (0);
return TALER_MHD_reply_with_error ( return TALER_MHD_reply_with_error (
connection, connection,
MHD_HTTP_CONFLICT, MHD_HTTP_CONFLICT,
TALER_EC_EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT, TALER_EC_EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT,
NULL); NULL);
} }
} }
return TALER_MHD_reply_static ( return TALER_MHD_reply_static (