#!/usr/bin/env bash # Generate denomination keys and get them # signed by the auditor. # # # set -eu if test -z $TALER_CONFIG_ENV; then echo Please run 'source ~/activate' beforehand. exit 1 fi auditor_request_dir=${HOME}/shared-data/exchange/auditor-request/ mkdir -p $auditor_request_dir taler-exchange-keyup \ -m ${HOME}/shared-data/exchange/offline-keys/master.priv \ -o $auditor_request_dir/auditor_request taler-auditor-exchange \ -m $(taler-config -s exchange -o master_public_key) \ -u $(taler-config -s exchange -o base_url) # Checks whether any denom key was generated, and # only sign it if so. if [[ -s $auditor_request_dir/auditor_request ]]; then echo "There key material for the auditor to sign" taler-auditor-sign \ -u $TALER_ENV_URL_AUDITOR \ -m $(taler-config -s exchange -o master_public_key) \ -r "$auditor_request_dir/auditor_request" \ -o "$(taler-config -s exchangedb -o auditor_base_dir -f)/$(date +%s%N)" \ -c ${HOME}/.config/taler.conf fi # Make sure the creator sets those permissions; or-ing # with 'true' is needed as when the other party will # execute this it will fail to chmod, but the permissions # are already right. chmod -R g+rw ${HOME}/shared-data || true