summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-11-19 13:42:36 -0500
committerMike Gilbert <floppym@gentoo.org>2016-11-19 13:42:36 -0500
commitae0c052e47bbfbbf35afaddcd2e828513c5f5acd (patch)
treec29563b8620bc1a361d5d741a600581a51bf2f2a /dev-python/httplib2
parentapp-crypt/gnupg: Enable tools IUSE by default (diff)
downloadgentoo-ae0c052e47bbfbbf35afaddcd2e828513c5f5acd.tar.gz
gentoo-ae0c052e47bbfbbf35afaddcd2e828513c5f5acd.tar.bz2
gentoo-ae0c052e47bbfbbf35afaddcd2e828513c5f5acd.zip
dev-python/httplib2: apply patch for CVE-2013-2037
Bug: https://bugs.gentoo.org/468252 Package-Manager: portage-2.3.2_p8
Diffstat (limited to 'dev-python/httplib2')
-rw-r--r--dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch21
-rw-r--r--dev-python/httplib2/httplib2-0.9.2-r2.ebuild (renamed from dev-python/httplib2/httplib2-0.9.2-r1.ebuild)12
2 files changed, 29 insertions, 4 deletions
diff --git a/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch b/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch
new file mode 100644
index 000000000000..6a09337b1993
--- /dev/null
+++ b/dev-python/httplib2/files/python-httplib2-0.9-cve-2013-2037.patch
@@ -0,0 +1,21 @@
+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 2015-04-03 13:10:43.401035131 -0600
++++ httplib2-0.9/python2/httplib2/__init__.py 2015-04-03 13:10:08.470685647 -0600
+@@ -1042,7 +1042,7 @@
+ raise CertificateHostnameMismatch(
+ 'Server presented certificate that does not match '
+ 'host %s: %s' % (hostname, cert), hostname, cert)
+- except ssl_SSLError, e:
++ except (ssl_SSLError, CertificateHostnameMismatch), e:
+ if sock:
+ sock.close()
+ if self.sock:
+@@ -1052,7 +1052,7 @@
+ # to get at more detailed error information, in particular
+ # whether the error is due to certificate validation or
+ # something else (such as SSL protocol mismatch).
+- if e.errno == ssl.SSL_ERROR_SSL:
++ if hasattr(e, 'errno') and e.errno == ssl.SSL_ERROR_SSL:
+ raise SSLHandshakeError(e)
+ else:
+ raise
diff --git a/dev-python/httplib2/httplib2-0.9.2-r1.ebuild b/dev-python/httplib2/httplib2-0.9.2-r2.ebuild
index 9fe30a1be1e7..73829485877c 100644
--- a/dev-python/httplib2/httplib2-0.9.2-r1.ebuild
+++ b/dev-python/httplib2/httplib2-0.9.2-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
+EAPI=6
-PYTHON_COMPAT=( python2_7 python3_{4,5} pypy pypy3 )
+PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy pypy3 )
inherit distutils-r1
@@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE=""
DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
@@ -22,6 +22,10 @@ DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
# tests connect to random remote sites
RESTRICT="test"
+PATCHES=(
+ "${FILESDIR}/python-httplib2-0.9-cve-2013-2037.patch"
+)
+
python_prepare_all() {
chmod o+r */*egg*/* || die
distutils-r1_python_prepare_all