mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-31 06:03:04 +02:00
use bash functionality instead of sed to filter SAN variable
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user