gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: do not log error on MHD_HTTP_GON


From: gnunet
Subject: [taler-exchange] branch master updated: do not log error on MHD_HTTP_GONE status code, revocation is a legitimate reply
Date: Sun, 20 Dec 2020 20:04:01 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 4b9fb610 do not log error on MHD_HTTP_GONE status code, revocation is 
a legitimate reply
4b9fb610 is described below

commit 4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Dec 20 20:03:59 2020 +0100

    do not log error on MHD_HTTP_GONE status code, revocation is a legitimate 
reply
---
 src/lib/auditor_api_deposit_confirmation.c         |  2 +-
 src/lib/auditor_api_exchanges.c                    |  4 +--
 src/lib/exchange_api_auditor_add_denomination.c    |  2 +-
 src/lib/exchange_api_deposit.c                     | 30 +++++++++++-------
 src/lib/exchange_api_deposits_get.c                |  2 +-
 src/lib/exchange_api_handle.c                      |  6 ++++
 src/lib/exchange_api_link.c                        |  2 +-
 src/lib/exchange_api_management_auditor_disable.c  |  2 +-
 src/lib/exchange_api_management_auditor_enable.c   |  2 +-
 src/lib/exchange_api_management_get_keys.c         |  2 +-
 src/lib/exchange_api_management_post_keys.c        |  2 +-
 ...change_api_management_revoke_denomination_key.c |  2 +-
 .../exchange_api_management_revoke_signing_key.c   |  2 +-
 src/lib/exchange_api_management_set_wire_fee.c     |  2 +-
 src/lib/exchange_api_management_wire_disable.c     |  2 +-
 src/lib/exchange_api_management_wire_enable.c      |  2 +-
 src/lib/exchange_api_melt.c                        |  2 +-
 src/lib/exchange_api_recoup.c                      |  2 +-
 src/lib/exchange_api_refreshes_reveal.c            |  7 ++++-
 src/lib/exchange_api_refund.c                      |  4 +--
 src/lib/exchange_api_reserves_get.c                |  2 +-
 src/lib/exchange_api_transfers_get.c               |  2 +-
 src/lib/exchange_api_wire.c                        |  2 +-
 src/lib/exchange_api_withdraw2.c                   | 36 +++++++++++++---------
 src/testing/test_bank_api.c                        |  8 ++---
 .../test_exchange_api_overlapping_keys_bug.c       | 12 --------
 src/testing/testing_api_cmd_withdraw.c             |  3 ++
 src/testing/testing_api_helpers_bank.c             |  4 ++-
 28 files changed, 83 insertions(+), 67 deletions(-)

diff --git a/src/lib/auditor_api_deposit_confirmation.c 
b/src/lib/auditor_api_deposit_confirmation.c
index bea5a78a..aee8850d 100644
--- a/src/lib/auditor_api_deposit_confirmation.c
+++ b/src/lib/auditor_api_deposit_confirmation.c
@@ -131,7 +131,7 @@ handle_deposit_confirmation_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for auditor deposit 
confirmation\n",
                 (unsigned int) response_code,
                 hr.ec);
     GNUNET_break_op (0);
diff --git a/src/lib/auditor_api_exchanges.c b/src/lib/auditor_api_exchanges.c
index 78f4d90e..ef7a3569 100644
--- a/src/lib/auditor_api_exchanges.c
+++ b/src/lib/auditor_api_exchanges.c
@@ -74,7 +74,7 @@ struct TALER_AUDITOR_ListExchangesHandle
 
 /**
  * Function called when we're done processing the
- * HTTP /deposit-confirmation request.
+ * HTTP /exchanges request.
  *
  * @param cls the `struct TALER_AUDITOR_ListExchangesHandle`
  * @param response_code HTTP response code, 0 on error
@@ -178,7 +178,7 @@ handle_exchanges_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for auditor list-exchanges 
request\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     GNUNET_break_op (0);
diff --git a/src/lib/exchange_api_auditor_add_denomination.c 
b/src/lib/exchange_api_auditor_add_denomination.c
index 7630acb1..d8df605d 100644
--- a/src/lib/exchange_api_auditor_add_denomination.c
+++ b/src/lib/exchange_api_auditor_add_denomination.c
@@ -110,7 +110,7 @@ handle_auditor_add_denomination_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange 
auditor-add-denomination\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index 7bb083ef..a3fb8667 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -361,6 +361,19 @@ handle_deposit_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     break;
+  case MHD_HTTP_FORBIDDEN:
+    hr.ec = TALER_JSON_get_error_code (j);
+    hr.hint = TALER_JSON_get_error_hint (j);
+    /* Nothing really to verify, exchange says one of the signatures is
+       invalid; as we checked them, this should never happen, we
+       should pass the JSON reply to the application */
+    break;
+  case MHD_HTTP_NOT_FOUND:
+    hr.ec = TALER_JSON_get_error_code (j);
+    hr.hint = TALER_JSON_get_error_hint (j);
+    /* Nothing really to verify, this should never
+     happen, we should pass the JSON reply to the application */
+    break;
   case MHD_HTTP_CONFLICT:
     /* Double spending; check signatures on transaction history */
     if (GNUNET_OK !=
@@ -377,18 +390,13 @@ handle_deposit_finished (void *cls,
       hr.hint = TALER_JSON_get_error_hint (j);
     }
     break;
-  case MHD_HTTP_FORBIDDEN:
+  case MHD_HTTP_GONE:
+    /* could happen if denomination was revoked */
+    /* Note: one might want to check /keys for revocation
+       signature here, alas tricky in case our /keys
+       is outdated => left to clients */
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
-    /* Nothing really to verify, exchange says one of the signatures is
-       invalid; as we checked them, this should never happen, we
-       should pass the JSON reply to the application */
-    break;
-  case MHD_HTTP_NOT_FOUND:
-    hr.ec = TALER_JSON_get_error_code (j);
-    hr.hint = TALER_JSON_get_error_hint (j);
-    /* Nothing really to verify, this should never
-     happen, we should pass the JSON reply to the application */
     break;
   case MHD_HTTP_INTERNAL_SERVER_ERROR:
     hr.ec = TALER_JSON_get_error_code (j);
@@ -401,7 +409,7 @@ handle_deposit_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange deposit\n",
                 (unsigned int) response_code,
                 hr.ec);
     GNUNET_break_op (0);
diff --git a/src/lib/exchange_api_deposits_get.c 
b/src/lib/exchange_api_deposits_get.c
index d5b2395a..ab689b5c 100644
--- a/src/lib/exchange_api_deposits_get.c
+++ b/src/lib/exchange_api_deposits_get.c
@@ -254,7 +254,7 @@ handle_deposit_wtid_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange GET deposits\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     GNUNET_break_op (0);
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 49af08b1..f45025d0 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -790,6 +790,9 @@ decode_keys_json (const json_t *resp_obj,
     GNUNET_break_op (0);
     return GNUNET_SYSERR;
   }
+  json_dumpf (resp_obj,
+              stderr,
+              JSON_INDENT (2));
   /* check the version */
   {
     const char *ver;
@@ -2023,6 +2026,9 @@ TALER_EXCHANGE_test_signing_key (const struct 
TALER_EXCHANGE_Keys *keys,
          (0 == GNUNET_memcmp (pub,
                               &keys->sign_keys[i].key)) )
       return GNUNET_OK;
+  GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+              "Signing key not valid at time %llu\n",
+              (unsigned long long) now.abs_value_us);
   return GNUNET_SYSERR;
 }
 
diff --git a/src/lib/exchange_api_link.c b/src/lib/exchange_api_link.c
index 33a77cdd..23a79d80 100644
--- a/src/lib/exchange_api_link.c
+++ b/src/lib/exchange_api_link.c
@@ -403,7 +403,7 @@ handle_link_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange link\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_auditor_disable.c 
b/src/lib/exchange_api_management_auditor_disable.c
index 823f9b13..1ae65774 100644
--- a/src/lib/exchange_api_management_auditor_disable.c
+++ b/src/lib/exchange_api_management_auditor_disable.c
@@ -108,7 +108,7 @@ handle_auditor_disable_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management 
auditor disable\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_auditor_enable.c 
b/src/lib/exchange_api_management_auditor_enable.c
index 3556cdb3..8bad2026 100644
--- a/src/lib/exchange_api_management_auditor_enable.c
+++ b/src/lib/exchange_api_management_auditor_enable.c
@@ -105,7 +105,7 @@ handle_auditor_enable_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management 
auditor enable\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_get_keys.c 
b/src/lib/exchange_api_management_get_keys.c
index c6548a34..7d0c5a9e 100644
--- a/src/lib/exchange_api_management_get_keys.c
+++ b/src/lib/exchange_api_management_get_keys.c
@@ -294,7 +294,7 @@ handle_get_keys_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management get 
keys\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_post_keys.c 
b/src/lib/exchange_api_management_post_keys.c
index 7b37bb0c..6273299a 100644
--- a/src/lib/exchange_api_management_post_keys.c
+++ b/src/lib/exchange_api_management_post_keys.c
@@ -105,7 +105,7 @@ handle_post_keys_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management post 
keys\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_revoke_denomination_key.c 
b/src/lib/exchange_api_management_revoke_denomination_key.c
index 722c13ab..492ece7e 100644
--- a/src/lib/exchange_api_management_revoke_denomination_key.c
+++ b/src/lib/exchange_api_management_revoke_denomination_key.c
@@ -106,7 +106,7 @@ handle_revoke_denomination_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management revoke 
denomination\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_revoke_signing_key.c 
b/src/lib/exchange_api_management_revoke_signing_key.c
index c58f7bdb..f403cee2 100644
--- a/src/lib/exchange_api_management_revoke_signing_key.c
+++ b/src/lib/exchange_api_management_revoke_signing_key.c
@@ -103,7 +103,7 @@ handle_revoke_signing_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management revoke 
signkey\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_set_wire_fee.c 
b/src/lib/exchange_api_management_set_wire_fee.c
index 511f431d..6048bf65 100644
--- a/src/lib/exchange_api_management_set_wire_fee.c
+++ b/src/lib/exchange_api_management_set_wire_fee.c
@@ -106,7 +106,7 @@ handle_set_wire_fee_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management set 
wire fee\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_wire_disable.c 
b/src/lib/exchange_api_management_wire_disable.c
index f7fc719d..613358fd 100644
--- a/src/lib/exchange_api_management_wire_disable.c
+++ b/src/lib/exchange_api_management_wire_disable.c
@@ -111,7 +111,7 @@ handle_auditor_disable_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d exchange management disable 
wire\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_management_wire_enable.c 
b/src/lib/exchange_api_management_wire_enable.c
index 6755c169..a4576296 100644
--- a/src/lib/exchange_api_management_wire_enable.c
+++ b/src/lib/exchange_api_management_wire_enable.c
@@ -107,7 +107,7 @@ handle_auditor_enable_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (json);
     hr.hint = TALER_JSON_get_error_hint (json);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange management enable 
wire\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_melt.c b/src/lib/exchange_api_melt.c
index b89443c8..d2aa6bdf 100644
--- a/src/lib/exchange_api_melt.c
+++ b/src/lib/exchange_api_melt.c
@@ -434,7 +434,7 @@ handle_melt_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange melt\n",
                 (unsigned int) response_code,
                 hr.ec);
     GNUNET_break_op (0);
diff --git a/src/lib/exchange_api_recoup.c b/src/lib/exchange_api_recoup.c
index 72d94634..a14edcea 100644
--- a/src/lib/exchange_api_recoup.c
+++ b/src/lib/exchange_api_recoup.c
@@ -286,7 +286,7 @@ handle_recoup_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange recoup\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     GNUNET_break (0);
diff --git a/src/lib/exchange_api_refreshes_reveal.c 
b/src/lib/exchange_api_refreshes_reveal.c
index 642ed6c9..c51e30b0 100644
--- a/src/lib/exchange_api_refreshes_reveal.c
+++ b/src/lib/exchange_api_refreshes_reveal.c
@@ -255,6 +255,11 @@ handle_refresh_reveal_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     break;
+  case MHD_HTTP_GONE:
+    /* Server claims key expired or has been revoked */
+    hr.ec = TALER_JSON_get_error_code (j);
+    hr.hint = TALER_JSON_get_error_hint (j);
+    break;
   case MHD_HTTP_INTERNAL_SERVER_ERROR:
     /* Server had an internal issue; we should retry, but this API
        leaves this to the application */
@@ -267,7 +272,7 @@ handle_refresh_reveal_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange refreshes 
reveal\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_refund.c b/src/lib/exchange_api_refund.c
index 870f3afd..b2f46810 100644
--- a/src/lib/exchange_api_refund.c
+++ b/src/lib/exchange_api_refund.c
@@ -365,7 +365,7 @@ verify_conflict_history_ok (struct 
TALER_EXCHANGE_RefundHandle *rh,
     {
       /* unexpected type, new version on server? */
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                  "Unexpected type `%s' in response\n",
+                  "Unexpected type `%s' in response for exchange refund\n",
                   type);
       GNUNET_break_op (0);
       return GNUNET_SYSERR;
@@ -622,7 +622,7 @@ handle_refund_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange refund\n",
                 (unsigned int) response_code,
                 hr.ec);
     break;
diff --git a/src/lib/exchange_api_reserves_get.c 
b/src/lib/exchange_api_reserves_get.c
index 3332a165..9a84b7f3 100644
--- a/src/lib/exchange_api_reserves_get.c
+++ b/src/lib/exchange_api_reserves_get.c
@@ -217,7 +217,7 @@ handle_reserves_get_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for reserves get\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_transfers_get.c 
b/src/lib/exchange_api_transfers_get.c
index e5bb17a8..d8ec2908 100644
--- a/src/lib/exchange_api_transfers_get.c
+++ b/src/lib/exchange_api_transfers_get.c
@@ -318,7 +318,7 @@ handle_transfers_get_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for transfers get\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_wire.c b/src/lib/exchange_api_wire.c
index 8534d54c..8653d5a9 100644
--- a/src/lib/exchange_api_wire.c
+++ b/src/lib/exchange_api_wire.c
@@ -360,7 +360,7 @@ handle_wire_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange wire\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/lib/exchange_api_withdraw2.c b/src/lib/exchange_api_withdraw2.c
index 2b6b1a8f..30439a59 100644
--- a/src/lib/exchange_api_withdraw2.c
+++ b/src/lib/exchange_api_withdraw2.c
@@ -275,6 +275,22 @@ handle_reserve_withdraw_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     break;
+  case MHD_HTTP_FORBIDDEN:
+    GNUNET_break_op (0);
+    /* Nothing really to verify, exchange says one of the signatures is
+       invalid; as we checked them, this should never happen, we
+       should pass the JSON reply to the application */
+    hr.ec = TALER_JSON_get_error_code (j);
+    hr.hint = TALER_JSON_get_error_hint (j);
+    break;
+  case MHD_HTTP_NOT_FOUND:
+    /* Nothing really to verify, the exchange basically just says
+       that it doesn't know this reserve.  Can happen if we
+       query before the wire transfer went through.
+       We should simply pass the JSON reply to the application. */
+    hr.ec = TALER_JSON_get_error_code (j);
+    hr.hint = TALER_JSON_get_error_hint (j);
+    break;
   case MHD_HTTP_CONFLICT:
     /* The exchange says that the reserve has insufficient funds;
        check the signatures in the history... */
@@ -292,19 +308,11 @@ handle_reserve_withdraw_finished (void *cls,
       hr.hint = TALER_JSON_get_error_hint (j);
     }
     break;
-  case MHD_HTTP_FORBIDDEN:
-    GNUNET_break_op (0);
-    /* Nothing really to verify, exchange says one of the signatures is
-       invalid; as we checked them, this should never happen, we
-       should pass the JSON reply to the application */
-    hr.ec = TALER_JSON_get_error_code (j);
-    hr.hint = TALER_JSON_get_error_hint (j);
-    break;
-  case MHD_HTTP_NOT_FOUND:
-    /* Nothing really to verify, the exchange basically just says
-       that it doesn't know this reserve.  Can happen if we
-       query before the wire transfer went through.
-       We should simply pass the JSON reply to the application. */
+  case MHD_HTTP_GONE:
+    /* could happen if denomination was revoked */
+    /* Note: one might want to check /keys for revocation
+       signature here, alas tricky in case our /keys
+       is outdated => left to clients */
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     break;
@@ -320,7 +328,7 @@ handle_reserve_withdraw_finished (void *cls,
     hr.ec = TALER_JSON_get_error_code (j);
     hr.hint = TALER_JSON_get_error_hint (j);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%d\n",
+                "Unexpected response code %u/%d for exchange withdraw\n",
                 (unsigned int) response_code,
                 (int) hr.ec);
     break;
diff --git a/src/testing/test_bank_api.c b/src/testing/test_bank_api.c
index 8e788493..7f3b7099 100644
--- a/src/testing/test_bank_api.c
+++ b/src/testing/test_bank_api.c
@@ -220,17 +220,13 @@ main (int argc,
       return 77;
     }
     libeufin_services = TALER_TESTING_run_libeufin (&bc);
-    if ( (NULL == libeufin_services.nexus) || (NULL ==
-                                               libeufin_services.sandbox) )
-    {
-      GNUNET_break (0);
+    if ( (NULL == libeufin_services.nexus) ||
+         (NULL == libeufin_services.sandbox) )
       return 77;
-    }
   }
   else
   {
     /* no bank service was ever invoked.  */
-    GNUNET_break (0);
     return 77;
   }
 
diff --git a/src/testing/test_exchange_api_overlapping_keys_bug.c 
b/src/testing/test_exchange_api_overlapping_keys_bug.c
index 27d4c680..74039cce 100644
--- a/src/testing/test_exchange_api_overlapping_keys_bug.c
+++ b/src/testing/test_exchange_api_overlapping_keys_bug.c
@@ -42,18 +42,6 @@
  */
 #define CONFIG_FILE "test_exchange_api_keys_cherry_picking.conf"
 
-/**
- * Used to increase the number of denomination keys.
- */
-#define CONFIG_FILE_EXTENDED \
-  "test_exchange_api_keys_cherry_picking_extended.conf"
-
-/**
- * Used to increase the number of denomination keys.
- */
-#define CONFIG_FILE_EXTENDED_2 \
-  "test_exchange_api_keys_cherry_picking_extended_2.conf"
-
 /**
  * Exchange configuration data.
  */
diff --git a/src/testing/testing_api_cmd_withdraw.c 
b/src/testing/testing_api_cmd_withdraw.c
index df33ef2e..cfbdc177 100644
--- a/src/testing/testing_api_cmd_withdraw.c
+++ b/src/testing/testing_api_cmd_withdraw.c
@@ -265,6 +265,9 @@ reserve_withdraw_cb (void *cls,
   case MHD_HTTP_CONFLICT:
     /* nothing to check */
     break;
+  case MHD_HTTP_GONE:
+    /* theoretically could check that the key was actually */
+    break;
   case MHD_HTTP_NOT_FOUND:
     /* nothing to check */
     break;
diff --git a/src/testing/testing_api_helpers_bank.c 
b/src/testing/testing_api_helpers_bank.c
index c42c52cd..6751f3f4 100644
--- a/src/testing/testing_api_helpers_bank.c
+++ b/src/testing/testing_api_helpers_bank.c
@@ -129,7 +129,9 @@ TALER_TESTING_run_libeufin (const struct 
TALER_TESTING_BankConfiguration *bc)
     NULL);
   if (NULL == nexus_proc)
   {
-    GNUNET_break (0);
+    GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
+                              "exec",
+                              "libeufin-nexus");
     return ret;
   }
   GNUNET_asprintf (&curl_check_cmd,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]