mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
@@ -994,7 +994,8 @@ extract_altnames() {
|
||||
# SANs used, extract these
|
||||
altnames="$( <<<"${reqtext}" awk '/X509v3 Subject Alternative Name:/{print;getline;print;}' | tail -n1 )"
|
||||
# split to one per line:
|
||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /'"'$'\n'"'/g' )"
|
||||
# shellcheck disable=SC1003
|
||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
||||
# we can only get DNS: ones signed
|
||||
if grep -qEv '^(DNS|othername):' <<<"${altnames}"; then
|
||||
_exiterr "Certificate signing request contains non-DNS Subject Alternative Names"
|
||||
|
||||
Reference in New Issue
Block a user