From a397f0077d11f317b943d41dd79d5b9a8220894f Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 30 Mar 2025 21:26:32 +0200 Subject: [PATCH] allow ssl.SSLContext type in the verify= argument of dns.query.https() (#1173) allow ssl.SSLContext type in the verify= argument of dns.query.https() and dns.asyncquery.https() --- dns/asyncquery.py | 2 +- dns/query.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dns/asyncquery.py b/dns/asyncquery.py index 7be1358d..3aae0027 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -539,7 +539,7 @@ async def https( client: Optional["httpx.AsyncClient|dns.quic.AsyncQuicConnection"] = None, path: str = "/dns-query", post: bool = True, - verify: Union[bool, str] = True, + verify: Union[bool, str, ssl.SSLContext] = True, bootstrap_address: Optional[str] = None, resolver: Optional["dns.asyncresolver.Resolver"] = None, # pyright: ignore family: int = socket.AF_UNSPEC, diff --git a/dns/query.py b/dns/query.py index 3a5cc18c..63733e56 100644 --- a/dns/query.py +++ b/dns/query.py @@ -402,7 +402,7 @@ def https( path: str = "/dns-query", post: bool = True, bootstrap_address: Optional[str] = None, - verify: Union[bool, str] = True, + verify: Union[bool, str, ssl.SSLContext] = True, resolver: Optional["dns.resolver.Resolver"] = None, # pyright: ignore family: int = socket.AF_UNSPEC, http_version: HTTPVersion = HTTPVersion.DEFAULT, -- 2.47.3