diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-03-04 11:57:57 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-03-04 11:57:57 +0100 |
commit | aba92c5bfa3efa9a7cabf2fc85b1f14bea2d8307 (patch) | |
tree | fec44c7e61e47592f5468632e5823fc3e48e679e /src/exchange-lib | |
parent | d06fb4d8182e5213e6d59cf0c5fe2c8d4c4cef36 (diff) | |
parent | 17ff4f5e97b981f0b3eebd6e3923fe60dc75edd5 (diff) | |
download | exchange-aba92c5bfa3efa9a7cabf2fc85b1f14bea2d8307.tar.xz |
modify /wire/test to provide bank URI and bank account numbers
Diffstat (limited to 'src/exchange-lib')
-rw-r--r-- | src/exchange-lib/exchange_api_wire.c | 20 | ||||
-rw-r--r-- | src/exchange-lib/test-exchange-home/config/exchange-common.conf | 8 | ||||
-rw-r--r-- | src/exchange-lib/test_exchange_api.c | 4 |
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 |