This commit is contained in:
2025-11-25 16:24:21 +01:00
parent f8b42a2674
commit 487e844cac
8 changed files with 119 additions and 59 deletions

View File

@@ -13,7 +13,7 @@ IP=`ip route get 8.8.8.8 | head -1 | cut -d' ' -f7`
fi
HOST=`uname -n`
openssl req -subj "/CN=$HOST" -sha256 -new -key server-key.pem -out server.csr
echo subjectAltName = DNS:$HOST,IP:$IP,IP:127.0.0.1 >> extfile.cnf
echo subjectAltName = DNS:$HOST,DNS:${HOST}.home.lan,IP:$IP,IP:127.0.0.1 >> extfile.cnf
echo extendedKeyUsage = serverAuth >> extfile.cnf
openssl x509 -req -days 365 -sha256 -in server.csr -CA ca.pem -CAkey ca-key.pem \
-CAcreateserial -out server-cert.pem -extfile extfile.cnf -passin pass:"foobarpwd"