From: Lukas Schauer Date: Wed, 20 Sep 2017 13:44:05 +0000 (+0200) Subject: allow for spaces when extracting commonName from csr (fixes #423) X-Git-Tag: v0.5.0~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5e178ea75d222db5b5ba467525915fcde079d30;p=thirdparty%2Fdehydrated.git allow for spaces when extracting commonName from csr (fixes #423) --- diff --git a/dehydrated b/dehydrated index 08df981..1331adb 100755 --- a/dehydrated +++ b/dehydrated @@ -498,7 +498,7 @@ extract_altnames() { else # 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}" fi }