mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-21 16:49:01 +01:00
fixed splitting of domain names in extract_altnames (fixes #127)
This commit is contained in:
@@ -306,7 +306,7 @@ extract_altnames() {
|
||||
# SANs used, extract these
|
||||
altnames="$( <<<"${reqtext}" grep -A1 '^[[:space:]]*X509v3 Subject Alternative Name:[[:space:]]*$' | tail -n1 )"
|
||||
# split to one per line:
|
||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/' )"
|
||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
||||
# we can only get DNS: ones signed
|
||||
if [ -n "$( <<<"${altnames}" grep -v '^DNS:' )" ]; then
|
||||
_exiterr "Certificate signing request contains non-DNS Subject Alternative Names"
|
||||
|
||||
Reference in New Issue
Block a user