summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-16 11:56:10 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-16 11:56:10 +0200
commit60c7d0f31266d213fe795610a30ca79d9a1156dc (patch)
tree2a68379fccc4c5ebaeddadea1dc2fdd47d5040db /src/exchange
parentc8b9370413d6a330f3b457359ed309ac9e964533 (diff)
parent5d2b56c3c39822b4af746142dd0f8a1676351ec5 (diff)
downloadexchange-60c7d0f31266d213fe795610a30ca79d9a1156dc.tar.gz
exchange-60c7d0f31266d213fe795610a30ca79d9a1156dc.tar.bz2
exchange-60c7d0f31266d213fe795610a30ca79d9a1156dc.zip
Merge branch 'master' of git+ssh://taler.net/var/git/exchange
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/Makefile.am3
-rw-r--r--src/exchange/exchange.conf2
-rwxr-xr-xsrc/exchange/taler-config-generate18
3 files changed, 18 insertions, 5 deletions
diff --git a/src/exchange/Makefile.am b/src/exchange/Makefile.am
index 314bf8ba4..ff4fe91dc 100644
--- a/src/exchange/Makefile.am
+++ b/src/exchange/Makefile.am
@@ -15,6 +15,9 @@ bin_PROGRAMS = \
taler-exchange-aggregator \
taler-exchange-httpd
+dist_bin_SCRIPTS = \
+ taler-config-generate
+
taler_exchange_aggregator_SOURCES = \
taler-exchange-aggregator.c
taler_exchange_aggregator_LDADD = \
diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index 7dffdd7fa..afb5b8fae 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -20,7 +20,7 @@ UNIXPATH = ${TALER_RUNTIME_DIR}/exchange.http
UNIXPATH_MODE = 660
# HTTP port the exchange listens to
-# PORT = 8081
+PORT = 8081
# Master public key used to sign the exchange's various keys
# MASTER_PUBLIC_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
diff --git a/src/exchange/taler-config-generate b/src/exchange/taler-config-generate
index 5693f920c..cc77d4798 100755
--- a/src/exchange/taler-config-generate
+++ b/src/exchange/taler-config-generate
@@ -129,13 +129,23 @@ fi
# Generate merchant-specific configuration
if (test 1 = "$ARG_M")
then
+ MASTER_KEY=`$CS -f -s merchant -o KEYFILE`
+
+# Generate master key (if missing)
+ if (test ! -e "$MASTER_KEY")
+ then
+ mkdir -p `dirname "$MASTER_KEY"`
+ gnunet-ecc -g 1 "$MASTER_KEY" || exit 1
+ fi
+
$CS -s merchant -o WIREFORMAT -V "$ARG_W" || exit 1
+ $CS -s merchant -o EDATE -V "3 week" || exit 1
if (test ! -z "$ARG_JM")
then
JSONF=`$CS -s merchant-wireformat -o ${ARG_W}_RESPONSE_FILE -f`
mkdir -p `dirname "$JSONF"`
- echo "$ARG_J" > "$JSONF" || exit 1
+ echo "$ARG_JM" > "$JSONF" || exit 1
else
echo "Skipped generating wire details for merchant"
fi
@@ -201,7 +211,7 @@ then
then
EPORT=`$CS -s exchange -o PORT`
$CS -s merchant-exchange-test -o URI -V "http://localhost:$EPORT/" || exit
- $CS -s merchant-exchange-test -o MASTER_KEY -V "$MASTER_KEY"
+ $CS -s merchant-exchange-test -o MASTER_KEY -V `$CS -s exchange -o MASTER_PUBLIC_KEY`
else
echo "Need to be configuring exchange as well for -t to be useful."
fi
@@ -217,7 +227,7 @@ do
$CS -s $SECTION -o duration_overlap -V "1 day" || exit 1
$CS -s $SECTION -o duration_withdraw -V "7 days" || exit 1
$CS -s $SECTION -o duration_spend -V "2 years" || exit 1
- $CS -s $SECTION -o duration_legal -V "3 tears" || exit 1
+ $CS -s $SECTION -o duration_legal -V "3 years" || exit 1
$CS -s $SECTION -o fee_withdraw -V "${ARG_CURRENCY}:0.01" || exit 1
$CS -s $SECTION -o fee_deposit -V "${ARG_CURRENCY}:0.01" || exit 1
$CS -s $SECTION -o fee_refresh -V "${ARG_CURRENCY}:0.01" || exit 1
@@ -232,7 +242,7 @@ do
$CS -s $SECTION -o duration_overlap -V "1 day" || exit 1
$CS -s $SECTION -o duration_withdraw -V "7 days" || exit 1
$CS -s $SECTION -o duration_spend -V "2 years" || exit 1
- $CS -s $SECTION -o duration_legal -V "3 tears" || exit 1
+ $CS -s $SECTION -o duration_legal -V "3 years" || exit 1
$CS -s $SECTION -o fee_withdraw -V "${ARG_CURRENCY}:0.01" || exit 1
$CS -s $SECTION -o fee_deposit -V "${ARG_CURRENCY}:0.01" || exit 1
$CS -s $SECTION -o fee_refresh -V "${ARG_CURRENCY}:0.01" || exit 1