Hello community,

here is the log from the commit of package python-httplib2 for openSUSE:Factory 
checked in at 2018-01-16 09:33:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-httplib2 (Old)
 and      /work/SRC/openSUSE:Factory/.python-httplib2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-httplib2"

Tue Jan 16 09:33:24 2018 rev:41 rq:563204 version:0.10.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-httplib2/python-httplib2.changes  
2017-04-28 10:43:42.832275240 +0200
+++ /work/SRC/openSUSE:Factory/.python-httplib2.new/python-httplib2.changes     
2018-01-16 09:33:25.630802795 +0100
@@ -1,0 +2,13 @@
+Wed Jan 10 07:47:54 UTC 2018 - [email protected]
+
+- update httplib2-use-system-certs.patch: handle
+  the case with ssl_version being None correctly
+
+-------------------------------------------------------------------
+Tue Jan  9 11:04:53 UTC 2018 - [email protected]
+
+- update httplib2-use-system-certs.patch: Also use
+  ssl.create_default_context in the python2 case so that
+  the system wide certificates are loaded as trusted again.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-httplib2.spec ++++++
--- /var/tmp/diff_new_pack.6t6ti4/_old  2018-01-16 09:33:26.082781648 +0100
+++ /var/tmp/diff_new_pack.6t6ti4/_new  2018-01-16 09:33:26.086781460 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-httplib2
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,6 +15,7 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
+
 # Tests require network connection
 %bcond_with tests
 
@@ -24,7 +25,7 @@
 Release:        0
 Url:            https://github.com/httplib2/httplib2
 Summary:        A Python HTTP client library
-License:        MIT and Apache-2.0 and (MPL-1.1 or GPL-2.0+ or LGPL-2.1+)
+License:        MIT AND Apache-2.0 AND (MPL-1.1 OR GPL-2.0+ OR LGPL-2.1+)
 Group:          Development/Libraries/Python
 Source:         
https://files.pythonhosted.org/packages/source/h/httplib2/httplib2-%{version}.tar.gz
 # PATCH-FIX-OPENSUSE: Don't ship private copy of Mozilla NSS certs, use system 
certs instead (bnc#761162)

++++++ httplib2-use-system-certs.patch ++++++
--- /var/tmp/diff_new_pack.6t6ti4/_old  2018-01-16 09:33:26.110780338 +0100
+++ /var/tmp/diff_new_pack.6t6ti4/_new  2018-01-16 09:33:26.110780338 +0100
@@ -1,8 +1,41 @@
-Index: httplib2-0.9.2/python2/httplib2/__init__.py
+Index: httplib2-0.10.3/python2/httplib2/__init__.py
 ===================================================================
---- httplib2-0.9.2.orig/python2/httplib2/__init__.py
-+++ httplib2-0.9.2/python2/httplib2/__init__.py
-@@ -184,15 +184,8 @@ class CertificateHostnameMismatch(SSLHan
+--- httplib2-0.10.3.orig/python2/httplib2/__init__.py
++++ httplib2-0.10.3/python2/httplib2/__init__.py
+@@ -83,11 +83,18 @@ def _ssl_wrap_socket(sock, key_file, cer
+         cert_reqs = ssl.CERT_NONE
+     else:
+         cert_reqs = ssl.CERT_REQUIRED
+-    if ssl_version is None:
+-        ssl_version = ssl.PROTOCOL_SSLv23
+-
+     if hasattr(ssl, 'SSLContext'):  # Python 2.7.9
+-        context = ssl.SSLContext(ssl_version)
++        cafile = ca_certs
++        capath = None
++        if cafile is not None and os.path.isdir(cafile):
++            cafile = None
++            capath = ca_certs
++
++        if ssl_version is None:
++            context = ssl.create_default_context(cafile=cafile, capath=capath)
++        else:
++            context = ssl.SSLContext(ssl_version)
++
+         context.verify_mode = cert_reqs
+         context.check_hostname = (cert_reqs != ssl.CERT_NONE)
+         if cert_file:
+@@ -96,6 +103,9 @@ def _ssl_wrap_socket(sock, key_file, cer
+             context.load_verify_locations(ca_certs)
+         return context.wrap_socket(sock, server_hostname=hostname)
+     else:
++        if ssl_version is None:
++            ssl_version = ssl.PROTOCOL_SSLv23
++
+         return ssl.wrap_socket(sock, keyfile=key_file, certfile=cert_file,
+                                cert_reqs=cert_reqs, ca_certs=ca_certs,
+                                ssl_version=ssl_version)
+@@ -210,15 +220,8 @@ class NotRunningAppEngineEnvironment(Htt
  # requesting that URI again.
  DEFAULT_MAX_REDIRECTS = 5
  
@@ -20,7 +53,7 @@
  
  # Which headers are hop-by-hop headers by default
  HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 
'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
-@@ -944,8 +937,6 @@ class HTTPSConnectionWithTimeout(httplib
+@@ -975,8 +978,6 @@ class HTTPSConnectionWithTimeout(httplib
                                           cert_file=cert_file, strict=strict)
          self.timeout = timeout
          self.proxy_info = proxy_info
@@ -29,10 +62,10 @@
          self.ca_certs = ca_certs
          self.disable_ssl_certificate_validation = \
                  disable_ssl_certificate_validation
-Index: httplib2-0.9.2/python3/httplib2/__init__.py
+Index: httplib2-0.10.3/python3/httplib2/__init__.py
 ===================================================================
---- httplib2-0.9.2.orig/python3/httplib2/__init__.py
-+++ httplib2-0.9.2/python3/httplib2/__init__.py
+--- httplib2-0.10.3.orig/python3/httplib2/__init__.py
++++ httplib2-0.10.3/python3/httplib2/__init__.py
 @@ -124,8 +124,7 @@ DEFAULT_MAX_REDIRECTS = 5
  HOP_BY_HOP = ['connection', 'keep-alive', 'proxy-authenticate', 
'proxy-authorization', 'te', 'trailers', 'transfer-encoding', 'upgrade']
  
@@ -43,7 +76,7 @@
  
  def _get_end2end_headers(response):
      hopbyhop = list(HOP_BY_HOP)
-@@ -838,16 +837,17 @@
+@@ -838,16 +837,17 @@ class HTTPSConnectionWithTimeout(http.cl
          # TODO: implement proxy_info
          self.proxy_info = proxy_info
          context = None
@@ -69,10 +102,10 @@
              if cert_file:
                  context.load_cert_chain(cert_file, key_file)
              if ca_certs:
-Index: httplib2-0.9.2/setup.py
+Index: httplib2-0.10.3/setup.py
 ===================================================================
---- httplib2-0.9.2.orig/setup.py
-+++ httplib2-0.9.2/setup.py
+--- httplib2-0.10.3.orig/setup.py
++++ httplib2-0.10.3/setup.py
 @@ -61,7 +61,6 @@ A comprehensive HTTP client library, ``h
          """,
          package_dir=pkgdir,


Reply via email to