Skip to content

Commit 8599aa1

Browse files
authored
Merge pull request #405 from pbhenson/cnames
Allow dns checks to deal with CNAME records
2 parents 8cbf31b + 358244c commit 8599aa1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

getssl

+5-4
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,11 @@
186186
# 2017-02-18 add OCSP Must-Staple to the domain csr generation (2.10)
187187
# 2019-09-30 issue #423 Use HTTP 1.1 as workaround atm (2.11)
188188
# 2019-10-02 issue #425 Case insensitive processing of agreement url because of HTTP/2 (2.12)
189+
# 2019-10-07 update DNS checks to allow use of CNAMEs (2.13)
189190
# ----------------------------------------------------------------------------------------
190191

191192
PROGNAME=${0##*/}
192-
VERSION="2.12"
193+
VERSION="2.13"
193194

194195
# defaults
195196
ACCOUNT_KEY_LENGTH=4096
@@ -1990,13 +1991,13 @@ if [[ $VALIDATE_VIA_DNS == "true" ]]; then
19901991
| grep '"'|awk -F'"' '{ print $2}')
19911992
elif [[ "$DNS_CHECK_FUNC" == "drill" ]] || [[ "$DNS_CHECK_FUNC" == "dig" ]]; then
19921993
check_result=$($DNS_CHECK_FUNC TXT "_acme-challenge.${d}" "@${ns}" \
1993-
| grep ^_acme|awk -F'"' '{ print $2}')
1994+
| grep '300 IN TXT'|awk -F'"' '{ print $2}')
19941995
elif [[ "$DNS_CHECK_FUNC" == "host" ]]; then
19951996
check_result=$($DNS_CHECK_FUNC -t TXT "_acme-challenge.${d}" "${ns}" \
1996-
| grep ^_acme|awk -F'"' '{ print $2}')
1997+
| grep 'descriptive text'|awk -F'"' '{ print $2}')
19971998
else
19981999
check_result=$(nslookup -type=txt "_acme-challenge.${d}" "${ns}" \
1999-
| grep ^_acme|awk -F'"' '{ print $2}')
2000+
| grep 'text ='|awk -F'"' '{ print $2}')
20002001
fi
20012002
debug "expecting $auth_key"
20022003
debug "${ns} gave ... $check_result"

0 commit comments

Comments
 (0)