Skip to content

Commit 9190157

Browse files
committed
travis-build.sh: decrypt the GPG signing keypair
For this to happen, the caller passes key and iv values to the script.
1 parent 885c60f commit 9190157

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

travis-build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ EOL
5555

5656
# Import the GPG signing key.
5757
keyFile=.travis/signingkey.asc
58+
key=$1
59+
iv=$2
60+
if [ "$key" -a "$iv" -a -f "$keyFile.enc" ]
61+
then
62+
# NB: Key and iv values were given as arguments.
63+
echo "== Decrypting GPG keypair =="
64+
openssl aes-256-cbc -K "$key" -iv "$iv" -in "$keyFile.enc" -out "$keyFile" -d
65+
fi
5866
if [ "$TRAVIS_SECURE_ENV_VARS" = true \
5967
-a "$TRAVIS_PULL_REQUEST" = false \
6068
-a -f "$keyFile" ]

0 commit comments

Comments
 (0)