annotate ui/tests/append-sig.sh @ 1402:1adf72328b75 tip

Added tag 1.0 for changeset ee807f64e21e
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 27 Jan 2015 15:18:32 +0100
parents 289cb3554c55
children
rev   line source
768
3f290ea49d45 Add helper script for signature creation to avoid cmake escaping hell
Andre Heinecke <andre.heinecke@intevation.de>
parents:
diff changeset
1 #!/bin/bash
1370
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
2 TMPFILE=$(mktemp)
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
3 cp "$2" "$TMPFILE"
1366
8c829345ecfa (issue179) Write signature date in linux installer and add to test script
Andre Heinecke <andre.heinecke@intevation.de>
parents: 774
diff changeset
4 CUR_DT=$(date +%s)
1370
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
5 sed -i "s/###SIGNATURE_DATE###/${CUR_DT}/" "$TMPFILE"
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
6 echo -e \\r\\nS_DT:$CUR_DT >> "$TMPFILE"
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
7 cp "$TMPFILE" "$3"
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
8 echo -e \\r\\nS:$(openssl dgst -sha256 -sign "$1" < "$TMPFILE" | base64 -w0) >> "$3"
289cb3554c55 Fix append-sig.sh to use a temporary file to insert the signature time
Andre Heinecke <andre.heinecke@intevation.de>
parents: 1366
diff changeset
9 rm "$TMPFILE"

http://wald.intevation.org/projects/trustbridge/