slackbuilds_ponce/python/httplib2/use_system_cacerts.patch
Matteo Bernardini 33649e1400
python/httplib2: Updated for version 0.11.3, changed homepage.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
2019-09-07 08:54:50 +07:00

56 lines
2.2 KiB
Diff

From: Marc Deslauriers <marc.deslauriers@canonical.com>
Date: Wed, 5 Sep 2018 14:02:17 +0800
Subject: Use system ca certificates, not the bundled ones
Forwarded: not-needed
Bug-Ubuntu: https://launchpad.net/bugs/882027
---
python2/httplib2/__init__.py | 5 ++---
python3/httplib2/__init__.py | 5 ++---
setup.py | 1 -
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py
index 18b013d..8b9a8c0 100644
--- a/python2/httplib2/__init__.py
+++ b/python2/httplib2/__init__.py
@@ -217,9 +217,8 @@ try:
import ca_certs_locater
CA_CERTS = ca_certs_locater.get()
except ImportError:
- # Default CA certificates file bundled with httplib2.
- CA_CERTS = os.path.join(
- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
+ # Use system CA certificates
+ CA_CERTS = "/etc/ssl/certs/ca-certificates.crt"
# Which headers are hop-by-hop headers by default
HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
diff --git a/python3/httplib2/__init__.py b/python3/httplib2/__init__.py
index 5dae2a5..8c63925 100644
--- a/python3/httplib2/__init__.py
+++ b/python3/httplib2/__init__.py
@@ -124,9 +124,8 @@ DEFAULT_MAX_REDIRECTS = 5
# Which headers are hop-by-hop headers by default
HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
-# Default CA certificates file bundled with httplib2.
-CA_CERTS = os.path.join(
- os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
+# Use system CA certificates
+CA_CERTS = "/etc/ssl/certs/ca-certificates.crt"
# PROTOCOL_TLS is python 3.5.3+. PROTOCOL_SSLv23 is deprecated.
# Both PROTOCOL_TLS and PROTOCOL_SSLv23 are equivalent and means:
diff --git a/setup.py b/setup.py
index 0f3a516..9c07bc2 100755
--- a/setup.py
+++ b/setup.py
@@ -58,7 +58,6 @@ A comprehensive HTTP client library, ``httplib2`` supports many features left ou
""",
package_dir=pkgdir,
packages=['httplib2'],
- package_data={'httplib2': ['*.txt']},
classifiers=(
'Development Status :: 4 - Beta',
'Environment :: Web Environment',