Commit cd13a9c2 authored by Lukas Schauer's avatar Lukas Schauer

use bash functionality instead of sed to filter SAN variable

parent 81cb6ac7
......@@ -129,7 +129,7 @@ sign_domain() {
for altname in $altnames; do
SAN+="DNS:${altname}, "
done
SAN="$(printf '%s' "${SAN}" | sed 's/,\s*$//g')"
SAN="${SAN%%, }"
echo " + Generating signing request..."
openssl req -new -sha256 -key "${BASEDIR}/certs/${domain}/privkey.pem" -out "${BASEDIR}/certs/${domain}/cert.csr" -subj "/CN=${domain}/" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=%s" "${SAN}")) > /dev/null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment