summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-keyup
blob: da10deac034ef2b12c82ba00f0420f223ad85858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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-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 .config/taler.conf

if [[ 0 != $? ]]; then
  echo Auditor signing not accomplished.
fi

chmod -fR g+rw ${HOME}/shared-data