aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-11 18:49:45 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-11 18:49:45 +0200
commit9e39308104794e7f1df4941db3d3e527b47ba15c (patch)
treeb42318ba78f0c57e48032d55bd9f871934cd76cd
parent1701d4f86a39edc390f172da6f8e72c94b6a8e97 (diff)
downloadanastasis-9e39308104794e7f1df4941db3d3e527b47ba15c.tar.gz
anastasis-9e39308104794e7f1df4941db3d3e527b47ba15c.zip
-get anastasis tests to pass again
-rw-r--r--src/testing/test_anastasis.c27
-rw-r--r--src/testing/test_anastasis_api.c27
-rw-r--r--src/testing/test_anastasis_api.conf144
-rw-r--r--src/testing/test_anastasis_api_home/taler/exchange-offline/master.priv1
-rw-r--r--src/testing/test_anastasis_api_home/taler/exchange/offline-keys/master.priv1
-rw-r--r--src/testing/test_anastasis_api_home/taler/exchange/offline-keys/secm_tofus.pubbin0 -> 96 bytes
-rw-r--r--src/testing/testing_cmd_secret_share.c2
7 files changed, 38 insertions, 164 deletions
diff --git a/src/testing/test_anastasis.c b/src/testing/test_anastasis.c
index bf3662d..f9e8531 100644
--- a/src/testing/test_anastasis.c
+++ b/src/testing/test_anastasis.c
@@ -318,19 +318,18 @@ run (void *cls,
318 318
319 struct TALER_TESTING_Command commands[] = { 319 struct TALER_TESTING_Command commands[] = {
320 /* general setup */ 320 /* general setup */
321 TALER_TESTING_cmd_auditor_add ("add-auditor-OK", 321 TALER_TESTING_cmd_run_fakebank ("run-fakebank",
322 MHD_HTTP_NO_CONTENT, 322 cred.cfg,
323 false), 323 "exchange-account-exchange"),
324 TALER_TESTING_cmd_wire_add ("add-wire-account", 324 TALER_TESTING_cmd_system_start ("start-taler",
325 "payto://x-taler-bank/localhost/2", 325 CONFIG_FILE,
326 MHD_HTTP_NO_CONTENT, 326 "-em",
327 false), 327 "-u", "exchange-account-exchange",
328 TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys", 328 NULL),
329 CONFIG_FILE), 329 TALER_TESTING_cmd_get_exchange ("get-exchange",
330 TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees", 330 cred.cfg,
331 CONFIG_FILE, 331 true,
332 "EUR:0.01", 332 true),
333 "EUR:0.01"),
334 TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys"), 333 TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys"),
335 TALER_TESTING_cmd_merchant_post_instances ("instance-create-default", 334 TALER_TESTING_cmd_merchant_post_instances ("instance-create-default",
336 merchant_url, 335 merchant_url,
@@ -388,7 +387,7 @@ main (int argc,
388 ret = TALER_TESTING_main (argv, 387 ret = TALER_TESTING_main (argv,
389 "INFO", 388 "INFO",
390 CONFIG_FILE, 389 CONFIG_FILE,
391 "exchange-account-2", 390 "exchange-account-exchange",
392 TALER_TESTING_BS_FAKEBANK, 391 TALER_TESTING_BS_FAKEBANK,
393 &cred, 392 &cred,
394 &run, 393 &run,
diff --git a/src/testing/test_anastasis_api.c b/src/testing/test_anastasis_api.c
index d365dd9..04071c9 100644
--- a/src/testing/test_anastasis_api.c
+++ b/src/testing/test_anastasis_api.c
@@ -266,19 +266,18 @@ run (void *cls,
266 266
267 struct TALER_TESTING_Command commands[] = { 267 struct TALER_TESTING_Command commands[] = {
268 /* general setup */ 268 /* general setup */
269 TALER_TESTING_cmd_auditor_add ("add-auditor-OK", 269 TALER_TESTING_cmd_run_fakebank ("run-fakebank",
270 MHD_HTTP_NO_CONTENT, 270 cred.cfg,
271 false), 271 "exchange-account-exchange"),
272 TALER_TESTING_cmd_wire_add ("add-wire-account", 272 TALER_TESTING_cmd_system_start ("start-taler",
273 "payto://x-taler-bank/localhost/2", 273 CONFIG_FILE,
274 MHD_HTTP_NO_CONTENT, 274 "-em",
275 false), 275 "-u", "exchange-account-exchange",
276 TALER_TESTING_cmd_exec_offline_sign_keys ("offline-sign-future-keys", 276 NULL),
277 CONFIG_FILE), 277 TALER_TESTING_cmd_get_exchange ("get-exchange",
278 TALER_TESTING_cmd_exec_offline_sign_fees ("offline-sign-fees", 278 cred.cfg,
279 CONFIG_FILE, 279 true,
280 "EUR:0.01", 280 true),
281 "EUR:0.01"),
282 TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys"), 281 TALER_TESTING_cmd_check_keys_pull_all_keys ("refetch /keys"),
283 TALER_TESTING_cmd_merchant_post_instances ("instance-create-default", 282 TALER_TESTING_cmd_merchant_post_instances ("instance-create-default",
284 merchant_url, 283 merchant_url,
@@ -341,7 +340,7 @@ main (int argc,
341 ret = TALER_TESTING_main (argv, 340 ret = TALER_TESTING_main (argv,
342 "INFO", 341 "INFO",
343 CONFIG_FILE, 342 CONFIG_FILE,
344 "exchange-account-2", 343 "exchange-account-exchange",
345 TALER_TESTING_BS_FAKEBANK, 344 TALER_TESTING_BS_FAKEBANK,
346 &cred, 345 &cred,
347 &run, 346 &run,
diff --git a/src/testing/test_anastasis_api.conf b/src/testing/test_anastasis_api.conf
index afd7aad..3b2f976 100644
--- a/src/testing/test_anastasis_api.conf
+++ b/src/testing/test_anastasis_api.conf
@@ -1,223 +1,99 @@
1# This file is in the public domain. 1# This file is in the public domain.
2# 2#
3[PATHS] 3[PATHS]
4# Persistent data storage for the testcase
5TALER_TEST_HOME = test_anastasis_api_home/ 4TALER_TEST_HOME = test_anastasis_api_home/
6TALER_RUNTIME_DIR = ${TMPDIR:-${TMP:-/tmp}}/${USER:-}/taler-system-runtime/
7
8# Persistent data storage
9TALER_DATA_HOME = $TALER_TEST_HOME/.local/share/taler/
10
11# Configuration files
12TALER_CONFIG_HOME = $TALER_TEST_HOME/.config/taler/
13
14# Cached data, no big deal if lost
15TALER_CACHE_HOME = $TALER_TEST_HOME/.cache/taler/
16 5
17[taler] 6[taler]
18# What currency do we use? 7CURRENCY = EUR
19#currency = EUR 8CURRENCY_ROUND_UNIT = EUR:0.01
20currency = EUR
21#CURRENCY_ROUND_UNIT = EUR:0.01
22#CURRENCY_ROUND_UNIT = EUR:0.01
23 9
24[taler-helper-crypto-rsa] 10[taler-helper-crypto-rsa]
25# Reduce from 1 year to speed up test
26LOOKAHEAD_SIGN = 12 days 11LOOKAHEAD_SIGN = 12 days
27 12
28[taler-helper-crypto-eddsa] 13[taler-helper-crypto-eddsa]
29# Reduce from 1 year to speed up test
30LOOKAHEAD_SIGN = 12 days 14LOOKAHEAD_SIGN = 12 days
31# Reduce from 12 weeks to ensure we have multiple
32DURATION = 7 days 15DURATION = 7 days
33 16
34
35[bank] 17[bank]
36HTTP_PORT = 8082 18HTTP_PORT = 8082
37#BASE_URL = https://bank.test.taler.net/ 19BASE_URL = http://localhost:8082/
38
39##########################################
40# Configuration for Anastasis #
41##########################################
42 20
43[anastasis] 21[anastasis]
44PORT = 8086 22PORT = 8086
45
46DB = postgres 23DB = postgres
47
48BUSINESS_NAME = "Checker's Test Inc." 24BUSINESS_NAME = "Checker's Test Inc."
49
50# Upload limit
51UPLOAD_LIMIT_MB = 1 25UPLOAD_LIMIT_MB = 1
52
53ANNUAL_POLICY_UPLOAD_LIMIT = 64 26ANNUAL_POLICY_UPLOAD_LIMIT = 64
54
55INSURANCE = EUR:0 27INSURANCE = EUR:0
56
57PROVIDER_SALT = salty 28PROVIDER_SALT = salty
58
59
60# Annual fee we charge.
61#ANNUAL_FEE = EUR:4.99
62ANNUAL_FEE = EUR:4.99 29ANNUAL_FEE = EUR:4.99
63
64TRUTH_UPLOAD_FEE = EUR:0.0 30TRUTH_UPLOAD_FEE = EUR:0.0
65 31BASE_URL = http://localhost:8086/
66# Base URL of anastasis.
67# BASE_URL = http://localhost:8086/
68 32
69[anastasis-merchant-backend] 33[anastasis-merchant-backend]
70# Where does our payment backend run? Must match PORT under [merchant]
71PAYMENT_BACKEND_URL = http://localhost:8080/ 34PAYMENT_BACKEND_URL = http://localhost:8080/
72 35
73# Authentication costs
74[authorization-question] 36[authorization-question]
75# Cost of authentication by question
76COST = EUR:0 37COST = EUR:0
77 38
78[authorization-file] 39[authorization-file]
79# Cost of authentication by file (only for testing purposes)
80COST = EUR:1 40COST = EUR:1
81 41
82[authorization-email] 42[authorization-email]
83# Cost of authentication by E-Mail
84COST = EUR:0 43COST = EUR:0
85 44
86[authorization-sms] 45[authorization-sms]
87# Cost of authentication by SMS
88COST = EUR:0 46COST = EUR:0
89
90# Command which is executed for the sms authentication
91COMMAND = ./sms_authentication.sh 47COMMAND = ./sms_authentication.sh
92 48
93
94
95
96# This specifies which database the postgres backend uses.
97[stasis-postgres] 49[stasis-postgres]
98CONFIG = postgres:///anastasischeck 50CONFIG = postgres:///anastasischeck
99 51
100##########################################
101# Configuration for the merchant backend #
102##########################################
103
104[merchant] 52[merchant]
105
106# Which port do we run the backend on? (HTTP server)
107PORT = 8080 53PORT = 8080
108
109# How quickly do we want the exchange to send us our money?
110# Used only if the frontend does not specify a value.
111WIRE_TRANSFER_DELAY = 0 s 54WIRE_TRANSFER_DELAY = 0 s
112
113# Which plugin (backend) do we use for the DB.
114DB = postgres 55DB = postgres
115 56
116# Default choice for maximum wire fee.
117DEFAULT_MAX_WIRE_FEE = EUR:0.10
118
119# Default choice for maximum deposit fee.
120DEFAULT_MAX_DEPOSIT_FEE = EUR:0.10
121
122
123# This specifies which database the postgres backend uses.
124[merchantdb-postgres] 57[merchantdb-postgres]
125CONFIG = postgres:///talercheck 58CONFIG = postgres:///talercheck
126 59
127# Sections starting with "exchange-" specify trusted exchanges
128# (by the merchant)
129[merchant-exchange-default] 60[merchant-exchange-default]
130MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG 61MASTER_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
131EXCHANGE_BASE_URL = http://localhost:8081/ 62EXCHANGE_BASE_URL = http://localhost:8081/
132#MASTER_KEY = DY95EXAHQ2BKM2WK9YHZHYG1R7PPMMJPY14FNGP662DAKE35AKQG
133#EXCHANGE_BASE_URL = https://exchange.test.taler.net/
134#CURRENCY = EUR
135CURRENCY = EUR 63CURRENCY = EUR
136 64
137# only fixes skips.
138[auditor] 65[auditor]
139BASE_URL = http://the.auditor/ 66PORT = 8083
140#BASE_URL = https://auditor.test.taler.net/ 67BASE_URL = "http://localhost:8083/"
141#AUDITOR_KEY = DSDASDXAMDAARMNAD53ZA4AFAHA2QADAMAHHASWDAWXN84SDAA11
142# If currency does not match [TALER] section, the auditor
143# will be ignored!
144CURRENCY = EUR
145
146# Where do we store the auditor's private key?
147AUDITOR_PRIV_FILE = ${TALER_DATA_HOME}/auditor/offline-keys/auditor.priv
148
149# Auditors must be in sections "auditor-", the rest of the section
150# name could be anything.
151[auditor-ezb]
152# Informal name of the auditor. Just for the user.
153NAME = European Central Bank
154
155# URL of the auditor (especially for in the future, when the
156# auditor offers an automated issue reporting system).
157# Not really used today.
158URL = http://taler.ezb.eu/
159
160# This is the important bit: the signing key of the auditor.
161PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
162
163# Which currency is this auditor trusted for?
164CURRENCY = EUR
165
166
167###################################################
168# Configuration for the exchange for the testcase #
169###################################################
170 68
171[exchange] 69[exchange]
172AML_THRESHOLD = EUR:1000000 70AML_THRESHOLD = EUR:1000000
173
174# How to access our database
175DB = postgres 71DB = postgres
176
177# HTTP port the exchange listens to
178PORT = 8081 72PORT = 8081
179
180# how long are the signatures with the signkey valid?
181SIGNKEY_LEGAL_DURATION = 2 years 73SIGNKEY_LEGAL_DURATION = 2 years
182
183# Our public key
184MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG 74MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
185
186# Base URL of the exchange.
187BASE_URL = "http://localhost:8081/" 75BASE_URL = "http://localhost:8081/"
188#BASE_URL = https://exchange.test.taler.net/
189
190# Network configuration for the normal API/service HTTP server
191# serve via tcp socket (on PORT)
192SERVE = tcp 76SERVE = tcp
193 77
194[exchange-offline] 78[exchange-offline]
195
196# Where do we store the offline master private key of the exchange?
197MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv 79MASTER_PRIV_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/master.priv
198 80
199# Where do we store the TOFU key material?
200SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/secm_tofus.pub 81SECM_TOFU_FILE = ${TALER_DATA_HOME}/exchange/offline-keys/secm_tofus.pub
201 82
202
203[taler-exchange-secmod-eddsa] 83[taler-exchange-secmod-eddsa]
204# Where do we store the generated private keys.
205KEY_DIR = ${TALER_DATA_HOME}/exchange-secmod-eddsa/keys 84KEY_DIR = ${TALER_DATA_HOME}/exchange-secmod-eddsa/keys
206 85
207[taler-exchange-secmod-rsa] 86[taler-exchange-secmod-rsa]
208# Where do we store the generated private keys.
209KEY_DIR = ${TALER_DATA_HOME}/exchange-secmod-rsa/keys 87KEY_DIR = ${TALER_DATA_HOME}/exchange-secmod-rsa/keys
210 88
89[taler-exchange-secmod-cs]
90KEY_DIR = ${TALER_DATA_HOME}/exchange-secmod-cs/keys
211 91
212[exchangedb-postgres]
213CONFIG = "postgres:///talercheck"
214 92
215[auditordb-postgres] 93[exchangedb-postgres]
216CONFIG = "postgres:///talercheck" 94CONFIG = "postgres:///talercheck"
217 95
218# Account of the EXCHANGE
219[exchange-account-exchange] 96[exchange-account-exchange]
220# What is the exchange's bank account (with the "Taler Bank" demo system)?
221PAYTO_URI = "payto://x-taler-bank/localhost:8082/2" 97PAYTO_URI = "payto://x-taler-bank/localhost:8082/2"
222ENABLE_DEBIT = YES 98ENABLE_DEBIT = YES
223ENABLE_CREDIT = YES 99ENABLE_CREDIT = YES
@@ -226,8 +102,6 @@ ENABLE_CREDIT = YES
226WIRE_GATEWAY_URL = "http://localhost:8082/2/" 102WIRE_GATEWAY_URL = "http://localhost:8082/2/"
227WIRE_GATEWAY_AUTH_METHOD = NONE 103WIRE_GATEWAY_AUTH_METHOD = NONE
228 104
229
230
231[coin_eur_ct_1] 105[coin_eur_ct_1]
232value = EUR:0.01 106value = EUR:0.01
233duration_withdraw = 7 days 107duration_withdraw = 7 days
diff --git a/src/testing/test_anastasis_api_home/taler/exchange-offline/master.priv b/src/testing/test_anastasis_api_home/taler/exchange-offline/master.priv
new file mode 100644
index 0000000..c20942d
--- /dev/null
+++ b/src/testing/test_anastasis_api_home/taler/exchange-offline/master.priv
@@ -0,0 +1 @@
k;d_U}A.w"!Gv_m"_ \ No newline at end of file
diff --git a/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/master.priv b/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/master.priv
new file mode 100644
index 0000000..c20942d
--- /dev/null
+++ b/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/master.priv
@@ -0,0 +1 @@
k;d_U}A.w"!Gv_m"_ \ No newline at end of file
diff --git a/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/secm_tofus.pub b/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/secm_tofus.pub
new file mode 100644
index 0000000..09a3ebd
--- /dev/null
+++ b/src/testing/test_anastasis_api_home/taler/exchange/offline-keys/secm_tofus.pub
Binary files differ
diff --git a/src/testing/testing_cmd_secret_share.c b/src/testing/testing_cmd_secret_share.c
index 70c97cf..3c401d2 100644
--- a/src/testing/testing_cmd_secret_share.c
+++ b/src/testing/testing_cmd_secret_share.c
@@ -359,7 +359,7 @@ secret_share_traits (void *cls,
359 struct SecretShareState *sss = cls; 359 struct SecretShareState *sss = cls;
360 struct TALER_TESTING_Trait traits[] = { 360 struct TALER_TESTING_Trait traits[] = {
361 TALER_TESTING_make_trait_claim_token (&sss->token), 361 TALER_TESTING_make_trait_claim_token (&sss->token),
362 ANASTASIS_TESTING_make_trait_core_secret (&sss->core_secret), 362 ANASTASIS_TESTING_make_trait_core_secret (sss->core_secret),
363 TALER_TESTING_make_trait_order_id (sss->payment_order_id), 363 TALER_TESTING_make_trait_order_id (sss->payment_order_id),
364 TALER_TESTING_trait_end () 364 TALER_TESTING_trait_end ()
365 }; 365 };