Blame SOURCES/python-httplib2.certfile.patch

215307
diff --git a/python2/httplib2/certs.py b/python2/httplib2/certs.py
215307
index 59d1ffc..a2e7513 100644
215307
--- a/python2/httplib2/certs.py
215307
+++ b/python2/httplib2/certs.py
215307
@@ -23,6 +23,7 @@ BUILTIN_CA_CERTS = os.path.join(
215307
     os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
215307
 )
215307
 
215307
+FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
215307
 
215307
 def where():
215307
     env = os.environ.get("HTTPLIB2_CA_CERTS")
215307
@@ -35,7 +36,7 @@ def where():
215307
         return custom_ca_locater_where()
215307
     if certifi_available:
215307
         return certifi_where()
215307
-    return BUILTIN_CA_CERTS
215307
+    return FEDORA_CA_CERTS
215307
 
215307
 
215307
 if __name__ == "__main__":
215307
diff --git a/python3/httplib2/certs.py b/python3/httplib2/certs.py
215307
index 59d1ffc..2708393 100644
215307
--- a/python3/httplib2/certs.py
215307
+++ b/python3/httplib2/certs.py
215307
@@ -23,6 +23,8 @@ BUILTIN_CA_CERTS = os.path.join(
215307
     os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
215307
 )
215307
 
215307
+FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
215307
+
215307
 
215307
 def where():
215307
     env = os.environ.get("HTTPLIB2_CA_CERTS")
215307
@@ -35,7 +37,7 @@ def where():
215307
         return custom_ca_locater_where()
215307
     if certifi_available:
215307
         return certifi_where()
215307
-    return BUILTIN_CA_CERTS
215307
+    return FEDORA_CA_CERTS
215307
 
215307
 
215307
 if __name__ == "__main__":
215307
diff --git a/tests/test_cacerts_from_env.py b/tests/test_cacerts_from_env.py
215307
index cb2bd9f..0fed4d5 100644
215307
--- a/tests/test_cacerts_from_env.py
215307
+++ b/tests/test_cacerts_from_env.py
215307
@@ -7,6 +7,7 @@ import httplib2
215307
 
215307
 
215307
 CA_CERTS_BUILTIN = os.path.join(os.path.dirname(httplib2.__file__), "cacerts.txt")
215307
+FEDORA_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
215307
 CERTIFI_CERTS_FILE = "unittest_certifi_file"
215307
 CUSTOM_CA_CERTS = "unittest_custom_ca_certs"
215307
 
215307
@@ -32,7 +33,7 @@ def ca_certs_tmpfile(clean_env):
215307
 @mock.patch("httplib2.certs.certifi_available", False)
215307
 @mock.patch("httplib2.certs.custom_ca_locater_available", False)
215307
 def test_certs_file_from_builtin(clean_env):
215307
-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
215307
+    assert httplib2.certs.where() == FEDORA_CA_CERTS
215307
 
215307
 
215307
 @mock.patch("httplib2.certs.certifi_available", False)
215307
@@ -44,7 +45,7 @@ def test_certs_file_from_environment(ca_certs_tmpfile):
215307
     with pytest.raises(RuntimeError):
215307
         httplib2.certs.where()
215307
     os.environ.pop("HTTPLIB2_CA_CERTS")
215307
-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
215307
+    assert httplib2.certs.where() == FEDORA_CA_CERTS
215307
 
215307
 
215307
 @mock.patch("httplib2.certs.certifi_where", mock.MagicMock(return_value=CERTIFI_CERTS_FILE))
215307
@@ -69,4 +70,4 @@ def test_with_certifi_removed_from_modules(ca_certs_tmpfile):
215307
     os.environ["HTTPLIB2_CA_CERTS"] = ca_certs_tmpfile
215307
     assert httplib2.certs.where() == ca_certs_tmpfile
215307
     os.environ.pop("HTTPLIB2_CA_CERTS")
215307
-    assert httplib2.certs.where() == CA_CERTS_BUILTIN
215307
+    assert httplib2.certs.where() == FEDORA_CA_CERTS