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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)
}