mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-23 16:58:28 +02:00
Remove additional whitespace from extract_altnames
This commit is contained in:
@@ -589,11 +589,11 @@ extract_altnames() {
|
|||||||
fi
|
fi
|
||||||
# strip away the DNS: prefix
|
# strip away the DNS: prefix
|
||||||
altnames="$( <<<"${altnames}" _sed -e 's/^(DNS:|othername:<unsupported>)//' )"
|
altnames="$( <<<"${altnames}" _sed -e 's/^(DNS:|othername:<unsupported>)//' )"
|
||||||
echo "${altnames}" | tr '\n' ' '
|
printf "%s" "${altnames}" | tr '\n' ' '
|
||||||
else
|
else
|
||||||
# No SANs, extract CN
|
# No SANs, extract CN
|
||||||
altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.* CN ?= ?([^ /,]*).*/\1/' )"
|
altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.* CN ?= ?([^ /,]*).*/\1/' )"
|
||||||
echo "${altnames}"
|
printf "%s" "${altnames}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user