You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
863 B

diff --git a/certifi/core.py b/certifi/core.py
index 5d2b8cd..062cc6b 100644
--- a/certifi/core.py
+++ b/certifi/core.py
@@ -9,6 +9,7 @@ This module returns the installation location of cacert.pem or its contents.
import os
try:
+ raise ImportError # force fallback
from importlib.resources import path as get_path, read_text
_CACERT_CTX = None
@@ -51,10 +52,8 @@ except ImportError:
# 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 '/etc/pki/tls/certs/ca-bundle.crt'
def contents():
- return read_text("certifi", "cacert.pem", encoding="ascii")
+ return read_text("certifi", "cacert.pem", encoding="utf-8")