python-setuptools/setuptools-certpath.patch
Jan Matejek 8b6122bdee - fix certificate handling with certifi, add support for SUSE's
CA bundle (setuptools-certpath.patch, fixes boo#993968)
- remove shebang lines, strip executable bit from README, to silence
  the easy rpmlint warnings

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools?expand=0&rev=100
2016-08-31 15:37:24 +00:00

22 lines
684 B
Diff

diff --git a/setuptools/ssl_support.py b/setuptools/ssl_support.py
index f4ba8a9..1627263 100644
--- a/setuptools/ssl_support.py
+++ b/setuptools/ssl_support.py
@@ -26,6 +26,7 @@ cert_paths = """
/etc/ssl/cert.pem
/System/Library/OpenSSL/certs/cert.pem
/usr/local/share/certs/ca-root-nss.crt
+/etc/ssl/ca-bundle.pem
""".strip().split()
@@ -242,6 +243,7 @@ def find_ca_bundle():
if os.path.isfile(cert_path):
return cert_path
try:
- return pkg_resources.resource_filename('certifi', 'cacert.pem')
+ import certifi
+ return certifi.where()
except (ImportError, ResolutionError, ExtractionError):
return None