-diff -Nur httplib2-0.9.orig/python2/httplib2/__init__.py httplib2-0.9/python2/httplib2/__init__.py
---- httplib2-0.9.orig/python2/httplib2/__init__.py 2014-04-14 06:52:57.000000000 -0600
-+++ httplib2-0.9/python2/httplib2/__init__.py 2014-05-23 21:17:02.082118837 -0600
-@@ -191,8 +191,10 @@
- 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")
-+# CA_CERTS = os.path.join(
-+# os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+ CA_CERTS = "/etc/pki/tls/certs/ca-bundle.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']
---- httplib2-0.9/python3/httplib2/__init__.py 2014-04-14 05:52:57.000000000 -0700
-+++ httplib2-0.9/python3/httplib2/__init__.py.new 2015-01-12 17:22:19.815505848 -0800
-@@ -124,8 +124,10 @@
- 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")
-+#CA_CERTS = os.path.join(
-+# os.path.dirname(os.path.abspath(__file__ )), "cacerts.txt")
-+# Use Fedora system-wide shared certificate store for security, consistency.
-+CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
-
- def _get_end2end_headers(response):
- hopbyhop = list(HOP_BY_HOP)
+--- httplib2-0.12.0/python2/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 +0100
++++ httplib2-0.12.0/python2/httplib2/certs.py 2018-11-16 06:34:12.392370656 +0100
+@@ -19,9 +19,7 @@ except ImportError:
+ pass
+
+
+-BUILTIN_CA_CERTS = os.path.join(
+- os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+-)
++BUILTIN_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+
+
+ def where():
+--- httplib2-0.12.0/python3/httplib2/certs.py~ 2018-11-14 05:40:05.000000000 +0100
++++ httplib2-0.12.0/python3/httplib2/certs.py 2018-11-16 06:34:27.006133962 +0100
+@@ -19,9 +19,7 @@ except ImportError:
+ pass
+
+
+-BUILTIN_CA_CERTS = os.path.join(
+- os.path.dirname(os.path.abspath(__file__)), "cacerts.txt"
+-)
++BUILTIN_CA_CERTS = "/etc/pki/tls/certs/ca-bundle.crt"
+
+
+ def where():
+++ /dev/null
-diff -up ./python2/httplib2/__init__.py.getCertHost ./python2/httplib2/__init__.py
---- ./python2/httplib2/__init__.py.getCertHost 2012-05-03 17:16:33.834155219 +1000
-+++ ./python2/httplib2/__init__.py 2012-06-21 18:19:33.804660257 +1000
-@@ -942,11 +942,12 @@ class HTTPSConnectionWithTimeout(httplib
- list: A list of valid host globs.
- """
- if 'subjectAltName' in cert:
-- return [x[1] for x in cert['subjectAltName']
-- if x[0].lower() == 'dns']
-- else:
-- return [x[0][1] for x in cert['subject']
-- if x[0][0].lower() == 'commonname']
-+ # Patch from richardfearn@gmail.com
-+ return [x[1] for x in cert['subjectAltName']
-+ if x[0].lower() == "dns"]
-+
-+ return [x[0][1] for x in cert['subject']
-+ if x[0][0].lower() == 'commonname']
-
- def _ValidateCertificateHostname(self, cert, hostname):
- """Validates that a given hostname is valid for an SSL certificate.
+++ /dev/null
-diff -up ./python2/httplib2/__init__.py.orig ./python2/httplib2/__init__.py
---- ./python2/httplib2/__init__.py.orig 2012-07-27 18:35:59.215300471 +1000
-+++ ./python2/httplib2/__init__.py 2012-07-27 18:36:30.697287505 +1000
-@@ -943,8 +943,13 @@ class HTTPSConnectionWithTimeout(httplib
- """
- if 'subjectAltName' in cert:
- # Patch from richardfearn@gmail.com
-- return [x[1] for x in cert['subjectAltName']
-+ # RFC 2459 states that subjectAltName may contain:
-+ # either DNS, email, IP or URI
-+ # email, URI,
-+ hosts=[x[1] for x in cert['subjectAltName']
- if x[0].lower() == "dns"]
-+ if hosts:
-+ return hosts
-
- return [x[0][1] for x in cert['subject']
- if x[0][0].lower() == 'commonname']
-
Summary: A comprehensive HTTP client library
Summary(pl.UTF-8): Obszerna biblioteka klienta HTTP
Name: python-httplib2
-Version: 0.11.3
-Release: 2
+Version: 0.12.0
+Release: 1
License: MIT
Group: Development/Languages/Python
Source0: https://github.com/httplib2/httplib2/archive/v%{version}.tar.gz
-# Source0-md5: b5dba454b541087cc5f674fed74916b4
+# Source0-md5: 1f3071d94551bfced890c34fd3524f68
Patch0: %{name}.certfile.patch
-Patch1: %{name}.getCertHost.patch
-Patch2: %{name}.rfc2459.patch
-Patch3: %{name}-0.9-proxy-http.patch
+Patch1: %{name}-0.9-proxy-http.patch
URL: https://github.com/httplib2/httplib2
BuildRequires: python >= 2.3
BuildRequires: python-modules
%setup -q -n httplib2-%{version}
%patch0 -p1
%patch1 -p1
-%patch2 -p1
-%patch3 -p1
%build
%py_build