nginx-sid/debian/tests/ec-x25519
Christos Trochalakis e60711fcc7 tests: Fix race between reload and curl's http request
Restart nginx to make sure it uses the new configuration.
2017-08-29 11:05:37 +03:00

21 lines
372 B
Bash

#!/bin/bash
set -e
rm /etc/nginx/sites-enabled/default
cat <<EOF > "/etc/nginx/sites-enabled/ssl"
server {
listen 443 default_server ssl;
include snippets/snakeoil.conf;
ssl_ecdh_curve X25519;
location / {
return 200;
}
}
EOF
nginx -t
invoke-rc.d nginx restart
curl --insecure --silent --fail -o /dev/null -w "response_code: %{http_code}\n" https://127.0.0.1/