summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/Makefile.am3
-rw-r--r--src/lib/test-mint-home/config/mint-common.conf30
-rw-r--r--src/lib/test-mint-home/config/mint-keyup.conf86
-rw-r--r--src/lib/test-mint-home/master.priv1
-rw-r--r--src/lib/test-mint-home/sepa.json6
-rw-r--r--src/lib/test_merchant.conf53
-rw-r--r--src/lib/test_merchant.priv1
-rw-r--r--src/lib/test_merchant_api.c7
8 files changed, 186 insertions, 1 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 83c6237c..e43630de 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -46,3 +46,6 @@ test_merchant_api_LDADD = \
-ltalerutil \
-lgnunetutil \
-ljansson
+
+EXTRA_DIST = \
+ test_merchant.conf
diff --git a/src/lib/test-mint-home/config/mint-common.conf b/src/lib/test-mint-home/config/mint-common.conf
new file mode 100644
index 00000000..b2b94826
--- /dev/null
+++ b/src/lib/test-mint-home/config/mint-common.conf
@@ -0,0 +1,30 @@
+[mint]
+# Currency supported by the mint (can only be one)
+CURRENCY = EUR
+
+# Wire format supported by the mint
+# We use 'test' for testing of the actual
+# coin operations, and 'sepa' to test SEPA-specific routines.
+WIREFORMAT = test sepa
+
+# HTTP port the mint listens to
+PORT = 8081
+
+# Master public key used to sign the mint's various keys
+MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
+
+# How to access our database
+DB = postgres
+
+# Is this is a testcase, use transient DB actions?
+TESTRUN = YES
+
+[mintdb-postgres]
+
+DB_CONN_STR = "postgres:///talercheck"
+
+[mint-wire-sepa]
+SEPA_RESPONSE_FILE = "test-mint-home/sepa.json"
+
+[mint-wire-test]
+REDIRECT_URL = "http://www.taler.net/"
diff --git a/src/lib/test-mint-home/config/mint-keyup.conf b/src/lib/test-mint-home/config/mint-keyup.conf
new file mode 100644
index 00000000..8ad1f3bb
--- /dev/null
+++ b/src/lib/test-mint-home/config/mint-keyup.conf
@@ -0,0 +1,86 @@
+[mint_keys]
+
+# how long is one signkey valid?
+signkey_duration = 4 weeks
+
+# how long are the signatures with the signkey valid?
+legal_duration = 2 years
+
+# how long do we generate denomination and signing keys
+# ahead of time?
+lookahead_sign = 32 weeks 1 day
+
+# how long do we provide to clients denomination and signing keys
+# ahead of time?
+lookahead_provide = 4 weeks 1 day
+
+
+# Coin definitions are detected because the section
+# name begins with "coin_". The rest of the
+# name is free, but of course following the convention
+# of "coin_$CURRENCY[_$SUBUNIT]_$VALUE" make sense.
+[coin_eur_ct_1]
+value = EUR:0.01
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.00
+fee_deposit = EUR:0.00
+fee_refresh = EUR:0.01
+rsa_keysize = 1024
+
+[coin_eur_ct_10]
+value = EUR:0.10
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+rsa_keysize = 1024
+
+[coin_eur_1]
+value = EUR:1
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+rsa_keysize = 1024
+
+[coin_eur_5]
+value = EUR:5
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+rsa_keysize = 1024
+
+[coin_eur_10]
+value = EUR:10
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+rsa_keysize = 1024
+
+[coin_eur_1000]
+value = EUR:1000
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+rsa_keysize = 2048
diff --git a/src/lib/test-mint-home/master.priv b/src/lib/test-mint-home/master.priv
new file mode 100644
index 00000000..39492693
--- /dev/null
+++ b/src/lib/test-mint-home/master.priv
@@ -0,0 +1 @@
+p^-33XX!\0qmU_ \ No newline at end of file
diff --git a/src/lib/test-mint-home/sepa.json b/src/lib/test-mint-home/sepa.json
new file mode 100644
index 00000000..36d12f66
--- /dev/null
+++ b/src/lib/test-mint-home/sepa.json
@@ -0,0 +1,6 @@
+{
+ "receiver_name": "Max Mustermann",
+ "iban": "DE89370400440532013000",
+ "bic": "COBADEFF370",
+ "sig": "8M5YJXM68PRAXKH76HYEBCJW657B23JA0RFGNDMZK2379YZMT626H1BN89KC0M1KJBWGYEN5Z763Q0Y7MCTZQ6BPPT7D9KFCTW60C10"
+} \ No newline at end of file
diff --git a/src/lib/test_merchant.conf b/src/lib/test_merchant.conf
new file mode 100644
index 00000000..7083aab1
--- /dev/null
+++ b/src/lib/test_merchant.conf
@@ -0,0 +1,53 @@
+# Sample configuration file for a merchant.
+[merchant]
+
+# Which port do we run the backend on? (HTTP server)
+PORT = 8082
+
+# FIXME: is this one used?
+HOSTNAME = localhost
+
+# Where is our private key?
+KEYFILE = test_merchant.priv
+
+# What currency does this backend accept?
+CURRENCY = KUDOS
+
+# FIXME: to be revised
+TRUSTED_MINTS = taler
+
+# How quickly do we want the mint to send us our money?
+# Used only if the frontend does not specify a value.
+# FIXME: EDATE is a bit short, 'execution_delay'?
+EDATE = 3 week
+
+# Which plugin (backend) do we use for the DB.
+DB = postgres
+
+[mint-taler]
+URI = http://localhost:8081/
+MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
+
+# Auditors must be in sections "auditor-", the rest of the section
+# name could be anything.
+[auditor-ezb]
+# Informal name of the auditor. Just for the user.
+NAME = European Central Bank
+
+# URI of the auditor (especially for in the future, when the
+# auditor offers an automated issue reporting system).
+# Not really used today.
+URI = http://taler.ezb.eu/
+
+# This is the important bit: the signing key of the auditor.
+PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
+
+# This specifies which database we use.
+[merchantdb-postgres]
+CONFIG = postgres:///talercheck
+
+# "wire-" sections include wire details, here for SEPA.
+[wire-sepa]
+IBAN = DE67830654080004822650
+NAME = GNUNET E.V
+BIC = GENODEF1SRL
diff --git a/src/lib/test_merchant.priv b/src/lib/test_merchant.priv
new file mode 100644
index 00000000..9c18c358
--- /dev/null
+++ b/src/lib/test_merchant.priv
@@ -0,0 +1 @@
+`&-./ jxGݢO:6l,ζXT4 \ No newline at end of file
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index bfbe2e46..ba2ff391 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -27,6 +27,11 @@
#include <microhttpd.h>
/**
+ * URI under which the merchant is reachable during the testcase.
+ */
+#define MERCHANT_URI "http://localhost:8082/"
+
+/**
* Main execution context for the main loop of the mint.
*/
static struct TALER_MINT_Context *ctx;
@@ -1337,7 +1342,7 @@ main (int argc,
NULL, NULL, NULL,
"taler-merchant-httpd",
"taler-merchant-httpd",
- "-c", "test-merchant-home",
+ "-c", "test_merchant.conf",
NULL);
/* give child time to start and bind against the socket */
fprintf (stderr, "Waiting for taler-mint-httpd to be ready");