allow for widely-used non-standard CSR label (fixes #488)

This commit is contained in:
Lukas Schauer
2018-03-26 00:00:50 +02:00
parent 981179a770
commit 537877a0e2

View File

@@ -1238,7 +1238,7 @@ command_sign_domains() {
local csr=""
if [[ -n "${HOOK}" ]]; then
csr="$("${HOOK}" "generate_csr" "${domain}" "${certdir}" "${domain} ${morenames}")"
if grep -q "\-----BEGIN CERTIFICATE REQUEST-----" <<< "${csr}"; then
if grep -qE "\-----BEGIN (NEW )?CERTIFICATE REQUEST-----" <<< "${csr}"; then
altnames="$(extract_altnames "${csr}")"
domain="$(cut -d' ' -f1 <<< "${altnames}")"
morenames="$(cut -s -d' ' -f2- <<< "${altnames}")"