Skip to content

Commit

Permalink
Tls client test (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhughesbiot authored Feb 8, 2021
1 parent 55c7438 commit f5e14d4
Show file tree
Hide file tree
Showing 5 changed files with 457 additions and 294 deletions.
5 changes: 3 additions & 2 deletions docker/include/bin/start_faux
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,9 @@ elif [ -n "${options[expiredtls]}" ]; then
echo Starting expired tls server on port 443 https.
mv /root/nginx/nginxfail.conf /etc/nginx/nginx.conf
service nginx start
python tlsfaux/client.py 1.2 google.com &
python tlsfaux/client.py 1.3 google.com &
DEFAULT_ROUTE=$(ip route show default | awk '/default/ {print $3}')
python tlsfaux/client.py 1.2 $DEFAULT_ROUTE &
python tlsfaux/client.py 1.3 $DEFAULT_ROUTE &
fi

if [ -n "${options[pubber]}" ]; then
Expand Down
5 changes: 5 additions & 0 deletions docker/include/network/scripts/start_networking
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,10 @@ if [ -f $GCP_CRED_FILE ]; then
) &
fi

# Setup a bad SSL Server for TLS client tests
echo Starting expired tls server on port 443 https.
mv /root/nginx/nginxfail.conf /etc/nginx/nginx.conf
service nginx start

echo Blocking for all eternity.
./autorestart_dnsmasq
10 changes: 9 additions & 1 deletion docker/modules/Dockerfile.networking
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

FROM daqf/aardvark:latest

RUN $AG update && $AG install apt-transport-https ca-certificates curl gnupg2
RUN $AG update && $AG install apt-transport-https ca-certificates curl gnupg2

RUN $AG update && $AG install -y nginx

RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" \
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
Expand All @@ -25,4 +28,9 @@ COPY udmi/ udmi/
# Weird workaround for problem running tcdump in a privlidged container.
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump

#HTTPS Bad Server depdnency
COPY docker/include/security/nginxfail.conf /root/nginx/
COPY docker/include/security/nginx-site /var/www/nginx-site
COPY docker/include/security/tlsfaux tlsfaux/

ENTRYPOINT ["./start_networking"]
Loading

0 comments on commit f5e14d4

Please sign in to comment.