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