From: Tom Christie Date: Thu, 21 Nov 2024 11:15:26 +0000 (+0000) Subject: Truststore X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3769c569edcb24e327a48b8f7264a2253a2f4728;p=thirdparty%2Fhttpx.git Truststore --- diff --git a/httpx/_config.py b/httpx/_config.py index 9318de3c..f28fbee4 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -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