mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-18 22:49:47 +02:00
support otherName SAN entries for domain verification (fixes #356)
This commit is contained in:
@@ -484,11 +484,11 @@ extract_altnames() {
|
|||||||
# shellcheck disable=SC1003
|
# shellcheck disable=SC1003
|
||||||
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
altnames="$( <<<"${altnames}" _sed -e 's/^[[:space:]]*//; s/, /\'$'\n''/g' )"
|
||||||
# we can only get DNS: ones signed
|
# we can only get DNS: ones signed
|
||||||
if grep -qv '^DNS:' <<<"${altnames}"; then
|
if grep -qEv '^(DNS|othername):' <<<"${altnames}"; then
|
||||||
_exiterr "Certificate signing request contains non-DNS Subject Alternative Names"
|
_exiterr "Certificate signing request contains non-DNS Subject Alternative Names"
|
||||||
fi
|
fi
|
||||||
# strip away the DNS: prefix
|
# strip away the DNS: prefix
|
||||||
altnames="$( <<<"${altnames}" _sed -e 's/^DNS://' )"
|
altnames="$( <<<"${altnames}" _sed -e 's/^(DNS:|othername:<unsupported>)//' )"
|
||||||
echo "${altnames}"
|
echo "${altnames}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user