From e78f7a8ffde872d94807cf1723ea717df576fb0b Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 8 Jun 2018 17:55:15 +0200 Subject: Auditor denom signing. Only attempt to sign denom keys _if_ any of those got generated; recall: denom keys only get generated when there is some gap between the validity of the youngest key and the "lookahead_sign" configuration timestamp. --- bin/taler-deployment-keyup | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'bin/taler-deployment-keyup') diff --git a/bin/taler-deployment-keyup b/bin/taler-deployment-keyup index 8e8ff62..a05ad6c 100755 --- a/bin/taler-deployment-keyup +++ b/bin/taler-deployment-keyup @@ -14,20 +14,21 @@ if test -z $TALER_CONFIG_ENV; then 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-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 - -if [[ 0 != $? ]]; then - echo Auditor signing not accomplished. -fi +# 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 chmod -fR g+rw ${HOME}/shared-data -- cgit v1.2.3