From: Bob Halley Date: Fri, 25 Mar 2022 19:16:03 +0000 (-0700) Subject: fix type of query paramater to https() method X-Git-Tag: v2.3.0rc1~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b625c08b178af27030b55180754e7e120501ada6;p=thirdparty%2Fdnspython.git fix type of query paramater to https() method --- diff --git a/dns/asyncquery.py b/dns/asyncquery.py index f22cba68..dd1fba4a 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -488,7 +488,7 @@ async def https( client: Optional["httpx.AsyncClient"] = None, path: str = "/dns-query", post: bool = True, - verify: bool = True, + verify: Union[bool, str] = True, ) -> dns.message.Message: """Return the response obtained after sending a query via DNS-over-HTTPS. diff --git a/dns/query.py b/dns/query.py index 9d069bb4..1dd32830 100644 --- a/dns/query.py +++ b/dns/query.py @@ -282,7 +282,7 @@ def https( path: str = "/dns-query", post: bool = True, bootstrap_address: Optional[str] = None, - verify: bool = True, + verify: Union[bool, str] = True, ) -> dns.message.Message: """Return the response obtained after sending a query via DNS-over-HTTPS. @@ -319,7 +319,10 @@ def https( *bootstrap_address*, a ``str``, the IP address to use to bypass the system's DNS resolver. - *verify*, a ``str``, containing a path to a certificate file or directory. + *verify*, a ``bool`` or ``str``. If a ``True``, then TLS certificate verification + of the server is done using the default CA bundle; if ``False``, then no + verification is done; if a `str` then it specifies the path to a certificate file or + directory which will be used for verification. Returns a ``dns.message.Message``. """