gen_dh(): Wrap long lines

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2023-01-20 16:23:04 +00:00
parent b3e4c638bf
commit e6aa6f6393
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246

View File

@ -1534,30 +1534,34 @@ gen_dh() {
DH parameters file already exists
at: $out_file"
else
# warn the user, give them a chance to force overwrite
# warn the user, allow to force overwrite
confirm "Overwrite? " "yes" "\
DH parameters file already exists
at: $out_file"
fi
fi
# Create a temp file, otherwise user abort leaves an incomplete dh.pem
tmp_dh_file="$(easyrsa_mktemp)" || die "Failed to create temp DH file"
# Create a temp file
# otherwise user abort leaves an incomplete dh.pem
tmp_dh_file="$(easyrsa_mktemp)" || \
die "Failed to create temp DH file"
# Generate dh.pem
"$EASYRSA_OPENSSL" dhparam -out "$tmp_dh_file" "$EASYRSA_KEY_SIZE" || \
die "Failed to generate DH params"
"$EASYRSA_OPENSSL" dhparam -out "$tmp_dh_file" \
"$EASYRSA_KEY_SIZE" || \
die "Failed to generate DH params"
# Validate dh.pem
"$EASYRSA_OPENSSL" dhparam -in "$tmp_dh_file" -check -noout || \
die "Failed to validate DH params"
"$EASYRSA_OPENSSL" dhparam -in "$tmp_dh_file" \
-check -noout || \
die "Failed to validate DH params"
mv -f "$tmp_dh_file" "$out_file" || die "Failed to move temp DH file"
mv -f "$tmp_dh_file" "$out_file" || \
die "Failed to move temp DH file"
notice "\
DH parameters of size $EASYRSA_KEY_SIZE created
at: $out_file"
notice "
DH parameters of size $EASYRSA_KEY_SIZE created at:
* $out_file"
return 0
} # => gen_dh()