From 30263b555025e1578f012e56292f90f1ffbcd986 Mon Sep 17 00:00:00 2001 From: redfast00 Date: Sat, 8 Oct 2016 20:58:02 +0200 Subject: [PATCH] Only offers download if keysize >= 4096, added explanation --- auto_install/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auto_install/install.sh b/auto_install/install.sh index 91c413b..55d69e6 100644 --- a/auto_install/install.sh +++ b/auto_install/install.sh @@ -715,9 +715,9 @@ confOpenVPN() { # Build the server ${SUDOE} ./build-key-server --batch $SERVER_NAME - if (whiptail --backtitle "Setup OpenVPN" --title "Diffie-Hellman Parameters" --yesno "Generating Diffie-Hellman might take a long time on a Raspberry Pi. Do you want to download them?" $r $c) + if ( ("$ENCRYPT" >= 4096) && whiptail --backtitle "Setup OpenVPN" --title "Diffie-Hellman Parameters" --defaultno --yesno "Generating Diffie-Hellman parameters for a $ENCRYPT-bits key might take a long time on a Raspberry Pi. Do you want to download them? (If you're paranoid, choose 'No')" $r $c) then - # Downloading parameters + # Downloading parameters, $KEY_DIR and $KEY_SIZE get set by sourcing ./vars ${SUDOE} curl "https://2ton.com.au/dhparam/${ENCRYPT}" -o "${KEY_DIR}/dh${KEY_SIZE}.pem" else # Generate Diffie-Hellman key exchange