mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Include localhost and hostname in altnames
This commit is contained in:
5
setup.sh
5
setup.sh
@@ -599,7 +599,8 @@ else
|
||||
openssl version >/dev/null 2>&1
|
||||
if [ "$?" = "0" ]; then
|
||||
# We can generate a new SSL key for this host
|
||||
openssl req -newkey rsa:2048 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 -sha256 >/dev/null 2>&1 <<EOF
|
||||
echo "subjectAltName=DNS:$host,DNS:localhost" >$tempdir/san.txt
|
||||
openssl req -newkey rsa:2048 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 -sha256 -extfile $tempdir/san.txt >/dev/null 2>&1 <<EOF
|
||||
.
|
||||
.
|
||||
.
|
||||
@@ -611,7 +612,7 @@ EOF
|
||||
if [ "$?" = "0" ]; then
|
||||
cat $tempdir/cert $tempdir/key >$kfile
|
||||
fi
|
||||
rm -f $tempdir/cert $tempdir/key
|
||||
rm -f $tempdir/cert $tempdir/key $tempdir/san.txt
|
||||
fi
|
||||
if [ ! -r $kfile ]; then
|
||||
# Fall back to the built-in key
|
||||
|
||||
Reference in New Issue
Block a user