From c63b15680a8e659d48ec7a94051921af8d38fba3 Mon Sep 17 00:00:00 2001 From: HPPinata <83947761+HPPinata@users.noreply.github.com> Date: Thu, 14 Oct 2021 17:33:20 +0200 Subject: [PATCH] Use sha256 instead of md5 MD5 is antiquated and should not be used any more --- generate-dhparam.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generate-dhparam.sh b/generate-dhparam.sh index 397fab0..14abdf1 100755 --- a/generate-dhparam.sh +++ b/generate-dhparam.sh @@ -12,9 +12,9 @@ DHPARAM_FILE="/etc/nginx/dhparam/dhparam.pem" GEN_LOCKFILE="/tmp/dhparam_generating.lock" # The hash of the pregenerated dhparam file is used to check if the pregen dhparam is already in use -PREGEN_HASH=$(md5sum $PREGEN_DHPARAM_FILE | cut -d" " -f1) +PREGEN_HASH=$(sha256sum $PREGEN_DHPARAM_FILE | cut -d" " -f1) if [[ -f $DHPARAM_FILE ]]; then - CURRENT_HASH=$(md5sum $DHPARAM_FILE | cut -d" " -f1) + CURRENT_HASH=$(sha256sum $DHPARAM_FILE | cut -d" " -f1) if [[ $PREGEN_HASH != "$CURRENT_HASH" ]]; then # There is already a dhparam, and it's not the default echo "Custom dhparam.pem file found, generation skipped"