blob: b585d12c1e021d25db6eee7c055249f7367be69f (
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
34
35
|
#!/bin/bash
set -e
# Decrypt our private files; changes to this file should be inspected
# closely to ensure they do not create information leaks
eval key="\${encrypted_${1}_key}"
eval iv="\${encrypted_${1}_iv}"
if [ ! "$key" ]
then
echo "No aes key present - skipping decryption"
exit 0
fi
for i in .travis/*.enc
do
u=$(echo $i | sed -e 's/.enc$//')
openssl aes-256-cbc -K "$key" -iv "$iv" -in $i -out $u -d
done
if [ -f .travis/travis_rsa ]
then
echo "ssh key present - loading agent"
eval "$(ssh-agent -s)"
# add key, then remove to prevent leaks
chmod 600 .travis/travis_rsa
ssh-add .travis/travis_rsa
rm -f .travis/travis_rsa
touch .travis/travis_rsa.ready
else
echo "No ssh key present - skipping agent start"
fi
|