summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xenolf/lego/acme
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xenolf/lego/acme')
-rw-r--r--vendor/github.com/xenolf/lego/acme/dns_challenge.go13
-rw-r--r--vendor/github.com/xenolf/lego/acme/dns_challenge_test.go9
2 files changed, 1 insertions, 21 deletions
diff --git a/vendor/github.com/xenolf/lego/acme/dns_challenge.go b/vendor/github.com/xenolf/lego/acme/dns_challenge.go
index 7c4cb80de..133739748 100644
--- a/vendor/github.com/xenolf/lego/acme/dns_challenge.go
+++ b/vendor/github.com/xenolf/lego/acme/dns_challenge.go
@@ -11,7 +11,6 @@ import (
"time"
"github.com/miekg/dns"
- "golang.org/x/net/publicsuffix"
)
type preCheckDNSFunc func(fqdn, value string) (bool, error)
@@ -242,10 +241,6 @@ func FindZoneByFqdn(fqdn string, nameservers []string) (string, error) {
labelIndexes := dns.Split(fqdn)
for _, index := range labelIndexes {
domain := fqdn[index:]
- // Give up if we have reached the TLD
- if isTLD(domain) {
- break
- }
in, err := dnsQuery(domain, dns.TypeSOA, nameservers, true)
if err != nil {
@@ -273,14 +268,6 @@ func FindZoneByFqdn(fqdn string, nameservers []string) (string, error) {
return "", fmt.Errorf("Could not find the start of authority")
}
-func isTLD(domain string) bool {
- publicsuffix, _ := publicsuffix.PublicSuffix(UnFqdn(domain))
- if publicsuffix == UnFqdn(domain) {
- return true
- }
- return false
-}
-
// ClearFqdnCache clears the cache of fqdn to zone mappings. Primarily used in testing.
func ClearFqdnCache() {
fqdnToZone = map[string]string{}
diff --git a/vendor/github.com/xenolf/lego/acme/dns_challenge_test.go b/vendor/github.com/xenolf/lego/acme/dns_challenge_test.go
index 597aaac17..4a2a7feac 100644
--- a/vendor/github.com/xenolf/lego/acme/dns_challenge_test.go
+++ b/vendor/github.com/xenolf/lego/acme/dns_challenge_test.go
@@ -37,14 +37,6 @@ var lookupNameserversTestsErr = []struct {
{"_null.n0n0.",
"Could not determine the zone",
},
- // invalid domain
- {"_null.com.",
- "Could not determine the zone",
- },
- // invalid domain
- {"in-valid.co.uk.",
- "Could not determine the zone",
- },
}
var findZoneByFqdnTests = []struct {
@@ -53,6 +45,7 @@ var findZoneByFqdnTests = []struct {
}{
{"mail.google.com.", "google.com."}, // domain is a CNAME
{"foo.google.com.", "google.com."}, // domain is a non-existent subdomain
+ {"example.com.ac.", "ac."}, // domain is a eTLD
}
var checkAuthoritativeNssTests = []struct {