fix: ignore empty domain names

This commit is contained in:
f 2024-12-28 17:59:59 -03:00
parent 5d88affc43
commit d9d739dc68
No known key found for this signature in database

View file

@ -108,6 +108,11 @@ case $1 in
if test -s "${cert}"; then
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
echo "ok - ${domain} certificate correctly set"
else