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