]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix type of query paramater to https() method
authorBob Halley <halley@dnspython.org>
Fri, 25 Mar 2022 19:16:03 +0000 (12:16 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 25 Mar 2022 19:16:03 +0000 (12:16 -0700)
dns/asyncquery.py
dns/query.py

index f22cba688d27373806937cbb80f73bd9b544cae2..dd1fba4a80b2a994c57833b8a905ea6f9cfbe458 100644 (file)
@@ -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.
 
index 9d069bb4e2255678ab9f9b8386ad46d3844d26b0..1dd32830e58d9c6edbc809c26b7f2b1844c3df84 100644 (file)
@@ -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``.
     """