From cda53ea254de51eb46cb0f53f7d33b9a0f794bfc Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 18 May 2016 17:55:40 +0200 Subject: Move /etc/ssl/private/dhparams.pem to /etc/ssl/dhparams.pem and make it public. Ideally we we should also increase the Diffie-Hellman group size from 2048-bit to 3072-bit, as per ENISA 2014 report. https://www.enisa.europa.eu/publications/algorithms-key-size-and-parameters-report-2014 But we postpone that for now until we are reasonably certain that older client won't be left out. --- roles/common/files/usr/local/bin/gendhparam.sh | 7 +++---- roles/common/tasks/main.yml | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'roles/common') diff --git a/roles/common/files/usr/local/bin/gendhparam.sh b/roles/common/files/usr/local/bin/gendhparam.sh index 84b7d56..a82a8a5 100755 --- a/roles/common/files/usr/local/bin/gendhparam.sh +++ b/roles/common/files/usr/local/bin/gendhparam.sh @@ -3,9 +3,8 @@ set -ue PATH=/usr/bin:/bin -privkey="$1" +out="$1" bits="${2:-2048}" -rand= -install --mode=0600 /dev/null "$privkey" -openssl dhparam -rand "${rand:-/dev/urandom}" "$bits" >"$privkey" +install --mode=0644 /dev/null "$out" +openssl dhparam "$bits" >"$out" diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 14cb7ae..1226d37 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -44,7 +44,8 @@ - genkeypair.sh - gendhparam.sh - name: Generate DH parameters - command: gendhparam.sh /etc/ssl/private/dhparams.pem creates=/etc/ssl/private/dhparams.pem + command: gendhparam.sh /etc/ssl/dhparams.pem 2048 + creates=/etc/ssl/dhparams.pem tags: genkey - include: logging.yml tags: logging -- cgit v1.2.3