Browse Source

Merge pull request #7 from gerhard-tinned/master

added '-' to allowed characters for the alt name check
pull/9/head
serverco 9 years ago
committed by GitHub
parent
commit
87590475f2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      checkssl

+ 2
- 1
checkssl View File

@ -34,6 +34,7 @@
# 2016-08-25 typo correction (1.05)
# 2016-08-25 removing set-x left in during some testing ... (1.06)
# 2016-09-17 moved upgrade option (-u) so it works if only option. (1.07)
# 2016-10-14 added '-' to allowed characters for the alt name check
# ---------------------------------------------------------------------------
PROGNAME=${0##*/}
@ -323,7 +324,7 @@ while IFS= read -r DOMAIN; do
if [[ -z $CERTINFO ]]; then
PROBLEMS=$(echo "${PROBLEMS}- no certificate found")
else
ALT_NAMES=$(echo "$CERTINFO" | openssl x509 -noout -text 2>/dev/null| grep "Subject Alternative Name" -A2 |grep -Eo "DNS:[a-zA-Z 0-9.]*" | cut -c 5-)
ALT_NAMES=$(echo "$CERTINFO" | openssl x509 -noout -text 2>/dev/null| grep "Subject Alternative Name" -A2 |grep -Eo "DNS:[a-zA-Z 0-9.-]*" | cut -c 5-)
debug "ALT Names $ALT_NAMES"
if [[ "$(echo "$ALT_NAMES" | grep "^${DOMAIN}")" == "${DOMAIN}" ]]; then
ISSUEDTO="${DOMAIN} (alt)"


Loading…
Cancel
Save