summaryrefslogtreecommitdiff
path: root/dev-python/certifi/files/certifi-2020.06.20-use-system-cacerts.patch
blob: 750954fa869c33f2c4a95d04317df940895e481a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -urN certifi-2020.6.20.orig/certifi/core.py certifi-2020.6.20/certifi/core.py
--- certifi-2020.6.20.orig/certifi/core.py	2020-08-01 17:50:13.139849550 +0200
+++ certifi-2020.6.20/certifi/core.py	2020-08-01 17:52:51.614857443 +0200
@@ -51,10 +51,9 @@
     # If we don't have importlib.resources, then we will just do the old logic
     # of assuming we're on the filesystem and munge the path directly.
     def where():
-        f = os.path.dirname(__file__)
-
-        return os.path.join(f, "cacert.pem")
+        return "@GENTOO_PORTAGE_EPREFIX@/etc/ssl/certs/ca-certificates.crt"
 
 
 def contents():
-    return read_text("certifi", "cacert.pem", encoding="ascii")
+    with open(where(), "r", encoding="ascii") as f:
+        return f.read()