diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/Makefile.am | 3 | ||||
-rw-r--r-- | src/exchange/exchange.conf | 2 | ||||
-rwxr-xr-x | src/exchange/taler-config-generate | 18 |
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 |