summaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/exchange_api_wire.c20
-rw-r--r--src/exchange-lib/test-exchange-home/config/exchange-common.conf8
-rw-r--r--src/exchange-lib/test_exchange_api.c4
3 files changed, 29 insertions, 3 deletions
diff --git a/src/exchange-lib/exchange_api_wire.c b/src/exchange-lib/exchange_api_wire.c
index fd40230c7..f01c5000b 100644
--- a/src/exchange-lib/exchange_api_wire.c
+++ b/src/exchange-lib/exchange_api_wire.c
@@ -84,6 +84,25 @@ struct TALER_EXCHANGE_WireHandle
/**
* Verify that the signature on the "200 OK" response
+ * for /wire/test from the exchange is valid.
+ * Accepts everything.
+ *
+ * @param wh wire handle
+ * @param json json reply with the signature
+ * @return #GNUNET_SYSERR if @a json is invalid,
+ * #GNUNET_NO if the method is unknown,
+ * #GNUNET_OK if the json is valid
+ */
+static int
+verify_wire_test_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh,
+ json_t *json)
+{
+ return GNUNET_OK;
+}
+
+
+/**
+ * Verify that the signature on the "200 OK" response
* for /wire/sepa from the exchange is valid.
*
* @param wh wire handle
@@ -182,6 +201,7 @@ verify_wire_method_signature_ok (const struct TALER_EXCHANGE_WireHandle *wh,
int (*handler)(const struct TALER_EXCHANGE_WireHandle *wh,
json_t *json);
} handlers[] = {
+ { "test", &verify_wire_test_signature_ok },
{ "sepa", &verify_wire_sepa_signature_ok },
{ NULL, NULL }
};
diff --git a/src/exchange-lib/test-exchange-home/config/exchange-common.conf b/src/exchange-lib/test-exchange-home/config/exchange-common.conf
index 35711a8f3..89b7f5182 100644
--- a/src/exchange-lib/test-exchange-home/config/exchange-common.conf
+++ b/src/exchange-lib/test-exchange-home/config/exchange-common.conf
@@ -26,5 +26,11 @@ DB_CONN_STR = "postgres:///talercheck"
SEPA_RESPONSE_FILE = "test-exchange-home/sepa.json"
[wire-test]
+# What is the main website of the bank?
BANK_URI = "http://localhost/"
-BANK_ACCOUNT_NUMBER = 1
+# Into which account at the 'bank' should incoming
+# wire transfers be made?
+BANK_ACCOUNT_NO_INCOMING = 2
+# From which account at the 'bank' should outgoing
+# wire transfers be made?
+BANK_ACCOUNT_NO_OUTGOING = 2 \ No newline at end of file
diff --git a/src/exchange-lib/test_exchange_api.c b/src/exchange-lib/test_exchange_api.c
index 80e2c6add..890e80756 100644
--- a/src/exchange-lib/test_exchange_api.c
+++ b/src/exchange-lib/test_exchange_api.c
@@ -2328,8 +2328,8 @@ run (void *cls,
#if WIRE_TEST
{ .oc = OC_WIRE,
.label = "wire-test",
- /* /wire/test replies with a 302 redirect */
- .expected_response_code = MHD_HTTP_FOUND,
+ /* /wire/test replies with a 200 OK */
+ .expected_response_code = MHD_HTTP_OK,
.details.wire.format = "test" },
#endif
#if WIRE_SEPA