forked from TrueCloudLab/lego
Merge pull request #136 from xi2/fix-handling-of-cnames
DNS Challenge: Fix handling of CNAMEs
This commit is contained in:
commit
7dcfb4a92b
1 changed files with 8 additions and 10 deletions
|
@ -82,10 +82,7 @@ func checkDNSPropagation(fqdn, value string) (bool, error) {
|
|||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
if r.Rcode != dns.RcodeSuccess {
|
||||
return false, fmt.Errorf("Could not resolve %s -> %s", fqdn, dns.RcodeToString[r.Rcode])
|
||||
}
|
||||
|
||||
if r.Rcode == dns.RcodeSuccess {
|
||||
// If we see a CNAME here then use the alias
|
||||
for _, rr := range r.Answer {
|
||||
if cn, ok := rr.(*dns.CNAME); ok {
|
||||
|
@ -95,6 +92,7 @@ func checkDNSPropagation(fqdn, value string) (bool, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
authoritativeNss, err := lookupNameservers(fqdn)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue