Skip to content

Commit 91edd7c

Browse files
authored
Merge pull request srvrco#830 from srvrco/cname-fix
Fix to refresh CNAME
2 parents 32a649f + 2cad636 commit 91edd7c

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

getssl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,8 @@ check_challenge_completion_dns() { # perform validation via DNS challenge
598598
rr_cname=$(grep -i "^${rr}"<<<"${check_output}"|grep 'IN\WCNAME'|awk '{ print $5}')
599599
debug "cname check=\"$rr_cname\""
600600
if [[ -n "$rr_cname" ]]; then
601+
# shellcheck disable=SC2086
602+
check_output=$($DNS_CHECK_FUNC $DNS_CHECK_OPTIONS TXT "${rr_cname}" "@${ns}")
601603
check_result=$(grep -i "^${rr_cname}"<<<"${check_output}"|grep 'IN\WTXT'|awk -F'"' '{ print $2}' | uniq)
602604
fi
603605
fi
@@ -1216,7 +1218,7 @@ create_order() {
12161218
dn=0
12171219
for d in "${alldomains[@]}"; do
12181220
# get authorizations link
1219-
AuthLink[$dn]=$(json_get "$response" "identifiers" "value" "${d##\*.}" "authorizations" "x")
1221+
AuthLink[dn]=$(json_get "$response" "identifiers" "value" "${d##\*.}" "authorizations" "x")
12201222
debug "authorizations link for $d - ${AuthLink[$dn]}"
12211223
((dn++))
12221224
done
@@ -1240,8 +1242,8 @@ create_order() {
12401242
if [[ ( "$lower_d" == "$authdomain" && -z "$wildcard" ) || ( "$lower_d" == "*.${authdomain}" && -n "$wildcard" ) ]]; then
12411243
debug "Saving authorization response for $authdomain for domain alldomains[$dn]"
12421244
debug "Response = ${response//[$'\t\r\n']}"
1243-
AuthLinkResponse[$dn]=$response
1244-
AuthLinkResponseHeader[$dn]=$responseHeaders
1245+
AuthLinkResponse[dn]=$response
1246+
AuthLinkResponseHeader[dn]=$responseHeaders
12451247
fi
12461248
((dn++))
12471249
done

test/README-Testing.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,20 @@ For individual accounts, <reponame> is your github account name.
3030
## To run all the tests on a single OS
3131

3232
1. Start `pebble` and `challtestsrv` using ```docker-compose up -d --build```
33-
2. Run the test suite ```run-test.sh [<os>]```
34-
3. eg. `run-test.sh ubuntu16`
33+
2. Run the test suite ```test/run-test.sh [<os>]```
34+
3. eg. `test/run-test.sh ubuntu16`
3535

3636
## To run a single bats test on a single OS
3737

3838
1. Start `pebble` and `challtestsrv` using ```docker-compose up -d --build```
39-
2. ```run-test.sh <os> bats <bats test script>```
40-
3. e.g. `run-test.sh ubuntu bats /getssl/test/1-simple-http01.bats`
39+
2. ```test/run-test.sh <os> bats <bats test script>```
40+
3. e.g. `test/run-test.sh ubuntu bats /getssl/test/1-simple-http01.bats`
4141

4242
## To debug a test
4343

4444
1. Start `pebble` and `challtestsrv` using ```docker-compose up -d --build```
4545
2. ```run-test.sh <os> /getssl/test/debug-test.sh <getssl config file>```
46-
3. e.g. `run-test.sh ubuntu /getssl/test/debug-test.sh -d /getssl/test/test-config/getssl-http01-cfg`
46+
3. e.g. `test/run-test.sh ubuntu /getssl/test/debug-test.sh -d /getssl/test/test-config/getssl-http01-cfg`
4747

4848
## TODO
4949

0 commit comments

Comments
 (0)