Fixed ssl

master
Keith Irwin 2022-09-10 13:28:23 -06:00
parent 8254322264
commit 186dd046f3
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
1 changed files with 2 additions and 3 deletions

View File

@ -59,10 +59,9 @@ if ! sudo chmod 400 "${SSL_CONFIG_DIR}/${username}/${hostname}/server.key" >>"${
fi
# Generate CSR
san="subjectAltName = DNS:${hostname}.${username}.${TLD},DNS:*.${hostname}.${username}.${TLD}"
san="subjectAltName=DNS:${hostname}.${username}.${TLD},DNS:*.${hostname}.${username}.${TLD}"
[ "${ipstring}" != "" ] && san="${san},${ipstring}"
<<<"${san}" grep ' ' && printf "SPACES IN SAN\n" >>"${LOGFILE}"
if ! sudo /usr/bin/openssl req -new -sha256 -reqexts SAN \
if ! sudo /usr/bin/openssl req -new -sha256 \
-key "${SSL_CONFIG_DIR}/${username}/${hostname}/server.key" \
-out "${SSL_CONFIG_DIR}/${username}/${hostname}.csr" \
-config '/etc/ssl/openssl.cnf' \