certwrangler.dns module#
- certwrangler.dns.wait_for_challenges(ctx: Context, dns_records: List[Tuple[str, str]], wait_timeout: timedelta, sleep: int = 5) None [source]#
Wait for our DNS challenges to propagate.
- Parameters:
ctx β The
click.Context
of the application.dns_records β A list of tuples containing the domain and the expected TXT record value.
wait_timeout β A
datetime.timedelta
of how long to wait.sleep β How long to sleep between each loop.
- Raises:
TimeoutError β Raised if the
wait_timeout
expires before we get our expected results.
- certwrangler.dns.resolve_cname(ctx: Context, name: str) str [source]#
Resolves
name
to its canonical name by recursively following any CNAME records until we fail to get a response. This can result inname
just being returned if it doesnβt resolve to a CNAME.- Parameters:
ctx β The
click.Context
of the application.name β The domain name to resolve.
- Returns:
The canonical name that
name
resolves to.- Raises:
ValueError β Raised if an infinite loop is detected in CNAME resolution.
- certwrangler.dns.resolve_zone(ctx: Context, name: str) str [source]#
Climb through the domain tree until we find the SOA for the zone.
- Parameters:
ctx β The
click.Context
of the application.name β The domain name to resolve.
- Returns:
The zone
name
belongs to.- Raises:
ValueError β Raised if we fail to find an SOA.