From 19da4bd63868a4c46959198ef95e4a8e1af38b77 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 4 Feb 2023 16:01:46 +0100 Subject: add tests for new AML logic, plus related bugfixes --- .../taler-exchange-httpd_aml-decision-get.c | 31 +++------------------- 1 file changed, 3 insertions(+), 28 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_aml-decision-get.c') diff --git a/src/exchange/taler-exchange-httpd_aml-decision-get.c b/src/exchange/taler-exchange-httpd_aml-decision-get.c index 09f9c8e86..e0252c614 100644 --- a/src/exchange/taler-exchange-httpd_aml-decision-get.c +++ b/src/exchange/taler-exchange-httpd_aml-decision-get.c @@ -101,7 +101,7 @@ static void aml_history_cb ( void *cls, const struct TALER_Amount *new_threshold, - enum TALER_AmlDecisionState new_status, + enum TALER_AmlDecisionState new_state, struct GNUNET_TIME_Timestamp decision_time, const char *justification, const struct TALER_AmlOfficerPublicKeyP *decider_pub, @@ -120,8 +120,8 @@ aml_history_cb ( justification), TALER_JSON_pack_amount ("new_threshold", new_threshold), - GNUNET_JSON_pack_int64 ("new_status", - new_status), + GNUNET_JSON_pack_int64 ("new_state", + new_state), GNUNET_JSON_pack_timestamp ("decision_time", decision_time) ))); @@ -134,7 +134,6 @@ TEH_handler_aml_decision_get ( const struct TALER_AmlOfficerPublicKeyP *officer_pub, const char *const args[]) { - struct TALER_AmlOfficerSignatureP officer_sig; struct TALER_PaytoHashP h_payto; if ( (NULL == args[0]) || @@ -159,30 +158,6 @@ TEH_handler_aml_decision_get ( TALER_EC_GENERIC_ENDPOINT_UNKNOWN, args[1]); } - { - const char *sig_hdr; - - sig_hdr = MHD_lookup_connection_value (rc->connection, - MHD_HEADER_KIND, - TALER_AML_OFFICER_SIGNATURE_HEADER); - if ( (NULL == sig_hdr) || - (GNUNET_OK != - GNUNET_STRINGS_string_to_data (sig_hdr, - strlen (sig_hdr), - &officer_sig, - sizeof (officer_sig))) || - (GNUNET_OK != - TALER_officer_aml_query_verify (officer_pub, - &officer_sig)) ) - { - GNUNET_break_op (0); - return TALER_MHD_reply_with_error (rc->connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID, - sig_hdr); - } - TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++; - } { json_t *aml_history; -- cgit v1.2.3