exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 3ef88d44302d5855f8bd789d00f03f9f7fd3796b
parent fc7800d320d5508a1bada7dc47d60cc46a96200f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed,  1 Nov 2023 11:35:57 +0100

add option to start challenger service

Diffstat:
Msrc/testing/taler-unified-setup.sh | 36++++++++++++++++++++++++++++++++++--
Msrc/util/crypto.c | 12++++++++----
2 files changed, 42 insertions(+), 6 deletions(-)

diff --git a/src/testing/taler-unified-setup.sh b/src/testing/taler-unified-setup.sh @@ -67,6 +67,7 @@ START_AUDITOR=0 START_BACKUP=0 START_EXCHANGE=0 START_FAKEBANK=0 +START_CHALLENGER=0 START_AGGREGATOR=0 START_MERCHANT=0 START_NEXUS=0 @@ -81,7 +82,7 @@ LOGLEVEL="DEBUG" DEFAULT_SLEEP="0.2" # Parse command-line options -while getopts ':abc:d:efghL:mnr:stu:vwW' OPTION; do +while getopts ':abc:d:efghkL:mnr:stu:vwW' OPTION; do case "$OPTION" in a) START_AUDITOR="1" @@ -130,6 +131,9 @@ while getopts ':abc:d:efghL:mnr:stu:vwW' OPTION; do g) START_AGGREGATOR="1" ;; + k) + START_CHALLENGER="1" + ;; L) LOGLEVEL="$OPTARG" ;; @@ -189,6 +193,13 @@ then echo " FOUND" fi +if [ "1" = "$START_CHALLENGER" ] +then + echo -n "Testing for Taler challenger" + challenger-httpd -h > /dev/null || exit_skip " challenger-httpd required" + echo " FOUND" +fi + if [ "1" = "$START_BACKUP" ] then echo -n "Testing for sync-httpd" @@ -304,7 +315,7 @@ then exit_skip "Failed to launch services (bank)" fi echo "OK" - echo -n "Set admin password..." + echo -n "Set admin password..." AUSER="admin" APASS="secret" libeufin-bank \ @@ -485,6 +496,16 @@ then echo " DONE" fi +if [ "1" = "$START_CHALLENGER" ] +then + echo -n "Starting challenger ..." + CHALLENGER_PORT=$(challenger-config -c "$CONF" -s CHALLENGER -o PORT) + CHALLENGER_URL="http://localhost:${CHALLENGER_PORT}/" + challenger-dbinit -c "$CONF" --reset + $USE_VALGRIND challenger-httpd -c "$CONF" -L "$LOGLEVEL" 2> challenger-httpd.log & + echo " DONE" +fi + if [ "1" = "$START_AUDITOR" ] then @@ -550,6 +571,17 @@ do -O /dev/null >/dev/null || continue S_DONE=1 fi + if [ "0" = "$S_DONE" ] && [ "1" = "$START_CHALLENGER" ] + then + echo -n "S" + wget \ + --tries=1 \ + --timeout=1 \ + "${CHALLENGER_URL}config" \ + -o /dev/null \ + -O /dev/null >/dev/null || continue + S_DONE=1 + fi if [ "0" = "$A_DONE" ] && [ "1" = "$START_AUDITOR" ] then echo -n "A" diff --git a/src/util/crypto.c b/src/util/crypto.c @@ -324,10 +324,14 @@ TALER_planchet_to_coin ( const struct TALER_ExchangeWithdrawValues *alg_values, struct TALER_FreshCoin *coin) { - if ( (dk->bsign_pub_key->cipher != - blind_sig->blinded_sig->cipher) || - (dk->bsign_pub_key->cipher != - alg_values->blinding_inputs->cipher) ) + if (dk->bsign_pub_key->cipher != + blind_sig->blinded_sig->cipher) + { + GNUNET_break_op (0); + return GNUNET_SYSERR; + } + if (dk->bsign_pub_key->cipher != + alg_values->blinding_inputs->cipher) { GNUNET_break_op (0); return GNUNET_SYSERR;