packages/python/python-dephell/0001-Do-not-override-the-system-SSL-certificates-with-the.patch

41 lines
1.2 KiB
Diff

From 4ad8b8276699f7d24178e66d0ea4147b776a0234 Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz@archlinux.org>
Date: Tue, 6 Aug 2019 19:43:13 -0400
Subject: [PATCH] Do not override the system SSL certificates with the certifi
bundle.
We need to respect the system certification policy, and by default the
ssl module will use our packaged ca-certificates.
---
dephell/networking.py | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/dephell/networking.py b/dephell/networking.py
index 9f862be..b33e1b1 100644
--- a/dephell/networking.py
+++ b/dephell/networking.py
@@ -2,7 +2,6 @@
from ssl import create_default_context
# external
-import certifi
import requests
from aiohttp import ClientSession, TCPConnector
@@ -17,11 +16,7 @@ def aiohttp_session(*, auth=None, **kwargs):
headers = dict()
if auth:
headers['Authorization'] = auth.encode()
- ssl_context = create_default_context(cafile=certifi.where())
- try:
- connector = TCPConnector(ssl=ssl_context)
- except TypeError:
- connector = TCPConnector(ssl_context=ssl_context)
+ connector = TCPConnector()
return ClientSession(headers=headers, connector=connector, **kwargs)
--
2.22.0