fix: ignore empty domain names
This commit is contained in:
parent
5d88affc43
commit
d9d739dc68
1 changed files with 5 additions and 0 deletions
|
@ -108,6 +108,11 @@ case $1 in
|
||||||
if test -s "${cert}"; then
|
if test -s "${cert}"; then
|
||||||
domain="`certtool -i < "${cert}" | grep Subject: | cut -d = -f 2 | tr -d " "`"
|
domain="`certtool -i < "${cert}" | grep Subject: | cut -d = -f 2 | tr -d " "`"
|
||||||
|
|
||||||
|
if test -z "${domain}" ; then
|
||||||
|
not_ok "couldn't find domain name for certificate ${cert}"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
if grep -q "^${domain}$" "${domains}"; then
|
if grep -q "^${domain}$" "${domains}"; then
|
||||||
echo "ok - ${domain} certificate correctly set"
|
echo "ok - ${domain} certificate correctly set"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue