Remove additional whitespace from extract_altnames

This commit is contained in:
Lukas Schauer
2018-02-06 20:38:02 +01:00
parent 62d37c9b3d
commit 87194f6596

View File

@@ -589,11 +589,11 @@ extract_altnames() {
fi
# strip away the DNS: prefix
altnames="$( <<<"${altnames}" _sed -e 's/^(DNS:|othername:<unsupported>)//' )"
echo "${altnames}" | tr '\n' ' '
printf "%s" "${altnames}" | tr '\n' ' '
else
# No SANs, extract CN
altnames="$( <<<"${reqtext}" grep '^[[:space:]]*Subject:' | _sed -e 's/.* CN ?= ?([^ /,]*).*/\1/' )"
echo "${altnames}"
printf "%s" "${altnames}"
fi
}