From b0de1f19d3d551af9304eb86720eb94233406e38 Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Thu, 12 Jan 2017 17:25:31 -0500 Subject: [PATCH] Updated to use 256-bit dhparam in tests --- test/ssl_dhparam.bats | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/ssl_dhparam.bats b/test/ssl_dhparam.bats index c193c5c..2d16595 100644 --- a/test/ssl_dhparam.bats +++ b/test/ssl_dhparam.bats @@ -16,12 +16,12 @@ function setup { --label bats-type="nginx-proxy" \ --name $SUT_CONTAINER \ -v /var/run/docker.sock:/tmp/docker.sock:ro \ - -e DHPARAM=256 \ + -e DHPARAM_BITS=256 \ $SUT_IMAGE \ && wait_for_nginxproxy_container_to_start $SUT_CONTAINER \ && docker logs $SUT_CONTAINER - DEFAULT_HASH=$(docker exec $SUT_CONTAINER md5sum /etc/nginx/dhparam/dhparam.pem | cut -d" " -f1) + DEFAULT_HASH=$(docker exec $SUT_CONTAINER md5sum /app/dhparam.pem.default | cut -d" " -f1) assert_success docker_wait_for_log $SUT_CONTAINER 30 "Generating DH parameters" @@ -29,7 +29,8 @@ function setup { # THEN docker_wait_for_log $SUT_CONTAINER 240 "dhparam generation complete, reloading nginx" - run docker exec $SUT_CONTAINER md5sum /etc/nginx/dhparam/dhparam.pem + run docker exec $SUT_CONTAINER su -c "md5sum /etc/nginx/dhparam/dhparam.pem" + refute_output -p $DEFAULT_HASH } @@ -57,7 +58,7 @@ function setup { --name $SUT_CONTAINER \ -v /var/run/docker.sock:/tmp/docker.sock:ro \ -v $TMP_DIR:/etc/nginx/dhparam \ - -e DHPARAM=256 \ + -e DHPARAM_BITS=256 \ $SUT_IMAGE \ && wait_for_nginxproxy_container_to_start $SUT_CONTAINER \ && docker logs $SUT_CONTAINER