f5eda6
From a8ef690988f92a56226f8b688f1a3638346bca8e Mon Sep 17 00:00:00 2001
f5eda6
From: Jeremy Cline <jeremy@jcline.org>
f5eda6
Date: Mon, 19 Jun 2017 16:09:02 -0400
f5eda6
Subject: [PATCH] Patch requests/certs.py to use the system CA bundle
f5eda6
f5eda6
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
f5eda6
---
f5eda6
 requests/certs.py | 11 ++++++++++-
f5eda6
 setup.py          |  1 -
f5eda6
 2 files changed, 10 insertions(+), 2 deletions(-)
f5eda6
f5eda6
diff --git a/requests/certs.py b/requests/certs.py
f5eda6
index d1a378d7..7b103baf 100644
f5eda6
--- a/requests/certs.py
f5eda6
+++ b/requests/certs.py
f5eda6
@@ -11,8 +11,17 @@ only one — the one from the certifi package.
f5eda6
 If you are packaging Requests, e.g., for a Linux distribution or a managed
f5eda6
 environment, you can change the definition of where() to return a separately
f5eda6
 packaged CA bundle.
f5eda6
+
f5eda6
+This Fedora-patched package returns "/etc/pki/tls/certs/ca-bundle.crt" provided
f5eda6
+by the ca-certificates RPM package.
f5eda6
 """
f5eda6
-from certifi import where
f5eda6
+try:
f5eda6
+    from certifi import where
f5eda6
+except ImportError:
f5eda6
+    def where():
f5eda6
+        """Return the absolute path to the system CA bundle."""
f5eda6
+        return '/etc/pki/tls/certs/ca-bundle.crt'
f5eda6
+
f5eda6
 
f5eda6
 if __name__ == '__main__':
f5eda6
     print(where())
f5eda6
diff --git a/setup.py b/setup.py
f5eda6
index 4e2ad936..60de5861 100755
f5eda6
--- a/setup.py
f5eda6
+++ b/setup.py
f5eda6
@@ -45,7 +45,6 @@ requires = [
f5eda6
     'chardet>=3.0.2,<3.1.0',
f5eda6
     'idna>=2.5,<2.8',
f5eda6
     'urllib3>=1.21.1,<1.25',
f5eda6
-    'certifi>=2017.4.17'
f5eda6
 
f5eda6
 ]
f5eda6
 test_requirements = [
f5eda6
-- 
f5eda6
2.19.1
f5eda6