]> git.ipfire.org Git - thirdparty/httpx.git/commitdiff
Truststore
authorTom Christie <tom@tomchristie.com>
Thu, 21 Nov 2024 11:15:26 +0000 (11:15 +0000)
committerGitHub <noreply@github.com>
Thu, 21 Nov 2024 11:15:26 +0000 (11:15 +0000)
httpx/_config.py

index 9318de3c1389f74a4d65fbba0671966704093abe..f28fbee472b4d36569637c7fddbda1330bf0462b 100644 (file)
@@ -22,10 +22,10 @@ UNSET = UnsetType()
 def create_ssl_context(verify: ssl.SSLContext | bool = True) -> ssl.SSLContext:
     import ssl
 
-    import certifi
+    import truststore
 
     if verify is True:
-        return ssl.create_default_context(cafile=certifi.where())
+        return  truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
     elif verify is False:
         ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
         ssl_context.check_hostname = False