Skip to content

Commit

Permalink
Merge pull request #405 from pbhenson/cnames
Browse files Browse the repository at this point in the history
 Allow dns checks to deal with CNAME records
  • Loading branch information
QuingKhaos authored Oct 7, 2019
2 parents 8cbf31b + 358244c commit 8599aa1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions getssl
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@
# 2017-02-18 add OCSP Must-Staple to the domain csr generation (2.10)
# 2019-09-30 issue #423 Use HTTP 1.1 as workaround atm (2.11)
# 2019-10-02 issue #425 Case insensitive processing of agreement url because of HTTP/2 (2.12)
# 2019-10-07 update DNS checks to allow use of CNAMEs (2.13)
# ----------------------------------------------------------------------------------------

PROGNAME=${0##*/}
VERSION="2.12"
VERSION="2.13"

# defaults
ACCOUNT_KEY_LENGTH=4096
Expand Down Expand Up @@ -1990,13 +1991,13 @@ if [[ $VALIDATE_VIA_DNS == "true" ]]; then
| grep '"'|awk -F'"' '{ print $2}')
elif [[ "$DNS_CHECK_FUNC" == "drill" ]] || [[ "$DNS_CHECK_FUNC" == "dig" ]]; then
check_result=$($DNS_CHECK_FUNC TXT "_acme-challenge.${d}" "@${ns}" \
| grep ^_acme|awk -F'"' '{ print $2}')
| grep '300 IN TXT'|awk -F'"' '{ print $2}')
elif [[ "$DNS_CHECK_FUNC" == "host" ]]; then
check_result=$($DNS_CHECK_FUNC -t TXT "_acme-challenge.${d}" "${ns}" \
| grep ^_acme|awk -F'"' '{ print $2}')
| grep 'descriptive text'|awk -F'"' '{ print $2}')
else
check_result=$(nslookup -type=txt "_acme-challenge.${d}" "${ns}" \
| grep ^_acme|awk -F'"' '{ print $2}')
| grep 'text ='|awk -F'"' '{ print $2}')
fi
debug "expecting $auth_key"
debug "${ns} gave ... $check_result"
Expand Down

0 comments on commit 8599aa1

Please sign in to comment.