mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-19 11:20:15 +00:00
Merge pull request #128 from shaungrady/randomize-dh-download
Randomize DH params fetched from 2ton.com.au
This commit is contained in:
commit
483d88f1e1
1 changed files with 2 additions and 1 deletions
|
@ -746,7 +746,8 @@ confOpenVPN() {
|
|||
if ([ "$ENCRYPT" -ge "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, $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"
|
||||
RANDOM_INDEX=$(( RANDOM % 128 ))
|
||||
${SUDOE} curl "https://2ton.com.au/dhparam/${ENCRYPT}/${RANDOM_INDEX}" -o "${KEY_DIR}/dh${KEY_SIZE}.pem"
|
||||
else
|
||||
# Generate Diffie-Hellman key exchange
|
||||
${SUDOE} ./build-dh
|
||||
|
|
Loading…
Reference in a new issue