summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-20 20:03:59 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-20 20:03:59 +0100
commit4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993 (patch)
tree4780bcb1ed882dee315bd11ac1033ac333704654 /src
parentd986555355de315121f1285c04ccc89082ba9755 (diff)
downloadexchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.tar.gz
exchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.tar.bz2
exchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.zip
do not log error on MHD_HTTP_GONE status code, revocation is a legitimate reply
Diffstat (limited to 'src')
-rw-r--r--src/lib/auditor_api_deposit_confirmation.c2
-rw-r--r--src/lib/auditor_api_exchanges.c4
-rw-r--r--src/lib/exchange_api_auditor_add_denomination.c2
-rw-r--r--src/lib/exchange_api_deposit.c30
-rw-r--r--src/lib/exchange_api_deposits_get.c2
-rw-r--r--src/lib/exchange_api_handle.c6
-rw-r--r--src/lib/exchange_api_link.c2
-rw-r--r--src/lib/exchange_api_management_auditor_disable.c2
-rw-r--r--src/lib/exchange_api_management_auditor_enable.c2
-rw-r--r--src/lib/exchange_api_management_get_keys.c2
-rw-r--r--src/lib/exchange_api_management_post_keys.c2
-rw-r--r--src/lib/exchange_api_management_revoke_denomination_key.c2
-rw-r--r--src/lib/exchange_api_management_revoke_signing_key.c2
-rw-r--r--src/lib/exchange_api_management_set_wire_fee.c2
-rw-r--r--src/lib/exchange_api_management_wire_disable.c2
-rw-r--r--src/lib/exchange_api_management_wire_enable.c2
-rw-r--r--src/lib/exchange_api_melt.c2
-rw-r--r--src/lib/exchange_api_recoup.c2
-rw-r--r--src/lib/exchange_api_refreshes_reveal.c7
-rw-r--r--src/lib/exchange_api_refund.c4
-rw-r--r--src/lib/exchange_api_reserves_get.c2
-rw-r--r--src/lib/exchange_api_transfers_get.c2
-rw-r--r--src/lib/exchange_api_wire.c2
-rw-r--r--src/lib/exchange_api_withdraw2.c36
-rw-r--r--src/testing/test_bank_api.c8
-rw-r--r--src/testing/test_exchange_api_overlapping_keys_bug.c12
-rw-r--r--src/testing/testing_api_cmd_withdraw.c3
-rw-r--r--src/testing/testing_api_helpers_bank.c4
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 bea5a78a5..aee8850d4 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 78f4d90e6..ef7a3569e 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 7630acb1e..d8df605de 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 7bb083efe..a3fb8667a 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 d5b2395aa..ab689b5cd 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 49af08b13..f45025d0f 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 33a77cddf..23a79d80c 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 823f9b134..1ae657742 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 3556cdb3b..8bad2026c 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 c6548a341..7d0c5a9ee 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 7b37bb0ca..6273299a3 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 722c13ab9..492ece7ef 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 c58f7bdbc..f403cee28 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 511f431d0..6048bf657 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 f7fc719d9..613358fdd 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 6755c1698..a45762963 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 b89443c84..d2aa6bdf1 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 72d946343..a14edceae 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 642ed6c9a..c51e30b01 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 870f3afdc..b2f468106 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 3332a165e..9a84b7f37 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 e5bb17a83..d8ec29089 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 8534d54c0..8653d5a94 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 2b6b1a8fc..30439a599 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 8e788493d..7f3b7099d 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 27d4c6801..74039cce4 100644
--- a/src/testing/test_exchange_api_overlapping_keys_bug.c
+++ b/src/testing/test_exchange_api_overlapping_keys_bug.c
@@ -43,18 +43,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.
*/
static struct TALER_TESTING_ExchangeConfiguration ec;
diff --git a/src/testing/testing_api_cmd_withdraw.c b/src/testing/testing_api_cmd_withdraw.c
index df33ef2eb..cfbdc177d 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 c42c52cd8..6751f3f4d 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,