Skip to content

Commit 10f08be

Browse files
authored
Merge pull request kitten#9 from sdaros/master
Verify GPG fingerprint of downloaded archive
2 parents 4bcfc0a + c404bd8 commit 10f08be

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ RUN apt-get update && apt-get install -y \
99
module-init-tools
1010

1111
ENV STRONGSWAN_VERSION 5.5.0
12+
ENV GPG_KEY 948F158A4E76A27BF3D07532DF42C170B34DBA77
1213

1314
RUN mkdir -p /usr/src/strongswan \
14-
&& curl -SL "https://download.strongswan.org/strongswan-$STRONGSWAN_VERSION.tar.gz" \
15-
| tar -zxC /usr/src/strongswan --strip-components 1 \
15+
&& cd /usr/src \
16+
&& curl -SOL "https://download.strongswan.org/strongswan-$STRONGSWAN_VERSION.tar.gz.sig" \
17+
&& curl -SOL "https://download.strongswan.org/strongswan-$STRONGSWAN_VERSION.tar.gz" \
18+
&& export GNUPGHOME="$(mktemp -d)" \
19+
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \
20+
&& gpg --batch --verify strongswan-$STRONGSWAN_VERSION.tar.gz.sig strongswan-$STRONGSWAN_VERSION.tar.gz \
21+
&& tar -zxf strongswan-$STRONGSWAN_VERSION.tar.gz -C /usr/src/strongswan --strip-components 1 \
1622
&& cd /usr/src/strongswan \
1723
&& ./configure --prefix=/usr --sysconfdir=/etc \
1824
--enable-eap-radius \
@@ -29,7 +35,7 @@ RUN mkdir -p /usr/src/strongswan \
2935
--enable-openssl \
3036
&& make -j \
3137
&& make install \
32-
&& rm -rf /usr/src/strongswan
38+
&& rm -rf "/usr/src/strongswan*"
3339

3440
# Strongswan Configuration
3541
ADD ipsec.conf /etc/ipsec.conf

0 commit comments

Comments
 (0)