mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 04:05:53 +02:00
apache: Ensure that not everyone can read the keys
This would become a security risk if anyone gets shell access as any user to copy out the HTTPS keys. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -11,6 +11,7 @@ generate_certificates() {
|
||||
if [ ! -f "/etc/httpd/server.key" ]; then
|
||||
boot_mesg "Generating HTTPS RSA server key (this will take a moment)..."
|
||||
openssl genrsa -out /etc/httpd/server.key 4096 &>/dev/null
|
||||
chmod 600 /etc/httpd/server.key
|
||||
evaluate_retval
|
||||
fi
|
||||
|
||||
@@ -18,6 +19,7 @@ generate_certificates() {
|
||||
boot_mesg "Generating HTTPS ECDSA server key..."
|
||||
openssl ecparam -genkey -name secp384r1 -noout \
|
||||
-out /etc/httpd/server-ecdsa.key &>/dev/null
|
||||
chmod 600 /etc/httpd/server-ecdsa.key
|
||||
evaluate_retval
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user