1
0
mirror of https://github.com/go-acme/lego.git synced 2025-09-16 09:36:23 +02:00

luadns: fix cname support (#1717)

This commit is contained in:
Ludovic Fernandez
2022-09-17 20:04:47 +02:00
committed by GitHub
parent e7ffbe77f8
commit 0d7ee5e750
3 changed files with 8 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ func TestNotHoldingLockWhileMakingHTTPRequests(t *testing.T) {
}()
select {
case <-resultCh:
case <-time.After(400 * time.Millisecond):
case <-time.After(500 * time.Millisecond):
t.Fatal("JWS is probably holding a lock while making HTTP request")
}
}

View File

@@ -50,7 +50,7 @@ func TestNotHoldingLockWhileMakingHTTPRequests(t *testing.T) {
}()
select {
case <-resultCh:
case <-time.After(400 * time.Millisecond):
case <-time.After(500 * time.Millisecond):
t.Fatal("JWS is probably holding a lock while making HTTP request")
}
}

View File

@@ -119,7 +119,12 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
return fmt.Errorf("luadns: failed to get zones: %w", err)
}
zone := findZone(zones, domain)
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return fmt.Errorf("luadns: failed to find zone: %w", err)
}
zone := findZone(zones, authZone)
if zone == nil {
return fmt.Errorf("luadns: no matching zone found for domain %s", domain)
}