summaryrefslogtreecommitdiff
path: root/dev-python/pyopenssl
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/pyopenssl
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/pyopenssl')
-rw-r--r--dev-python/pyopenssl/Manifest16
-rw-r--r--dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch19
-rw-r--r--dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch31
-rw-r--r--dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch84
-rw-r--r--dev-python/pyopenssl/metadata.xml13
-rw-r--r--dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild56
-rw-r--r--dev-python/pyopenssl/pyopenssl-16.2.0.ebuild62
-rw-r--r--dev-python/pyopenssl/pyopenssl-17.0.0.ebuild62
-rw-r--r--dev-python/pyopenssl/pyopenssl-17.2.0.ebuild67
-rw-r--r--dev-python/pyopenssl/pyopenssl-17.3.0.ebuild67
10 files changed, 477 insertions, 0 deletions
diff --git a/dev-python/pyopenssl/Manifest b/dev-python/pyopenssl/Manifest
new file mode 100644
index 000000000000..f149ce890b5a
--- /dev/null
+++ b/dev-python/pyopenssl/Manifest
@@ -0,0 +1,16 @@
+AUX pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch 809 SHA256 297622a201b1c8dbb0c7a39497d9c76449e930df9a0774cf3ba1340897c8f0be SHA512 6b6d6358553690c36a84b568bda6d52f6cac0dd599fd54ab0f3bd7c58a5a2223776f8f3434be9ea43e6bc77e0148b4c33c871a2463fd99e65f9cbdb59862c63f WHIRLPOOL ae9e76afe79c2ea8947572dcfae5d59331e12e11fddb5484a727be6838df17a0aafe089f2e60522e3bd31f6a8a95ca815413f76c3fe5bf467b140a35ab8501ed
+AUX pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch 1133 SHA256 57583a51f990ff9d4449454d820d751cba72daba33fb4922bcace98b346b9b3e SHA512 7968d3cd4c59fe15afc857330b1951275b98f281cf8de50033c27c8a4020a910d177afe035a965f7c4560cee555280f0e164264745faba9f32790650ae5b7f52 WHIRLPOOL 5ee55540a59277abacc0fbf5f7c61a93509bc573dc423765abf00828e1e9bcdefbdf9acfb7e0be9851eec64a5d386e4ab48912cd2f5c37433a90ac04ff9e4513
+AUX pyopenssl-0.15.1-openssl-1.0.2-backport.patch 3246 SHA256 f5142d963ccd2896d9f1ad841df181551f474b91a2102a2fdfaed5d761a88453 SHA512 f869ad277f04704a029d952acc52709e85aa4fc9040de72c6432a611dd1ef8329f442c5b8587cf05f707c5938b6bce5c3068daf4060858d896b1e956965901e9 WHIRLPOOL a35a38df774d24243a1cb7bcc7a6fe39ca1d98b54a5dbdf8d927e8a727f18355ff3bb64152dd8e635eb37ea3e283ee14f65e66e0551963f25f20c69e8a482bce
+DIST pyOpenSSL-0.15.1.tar.gz 149887 SHA256 f0a26070d6db0881de8bcc7846934b7c3c930d8f9c79d45883ee48984bc0d672 SHA512 bd204f40c9583a8580cff28b061f02ea772fdda3965dab6ac9e3f8c3b98792bea87b6de76494f7ce81e1ddcc76019432a9ffa3bcd55c5adb063bb639efe62e51 WHIRLPOOL 34badbf11b49cb65019cb55da7c6d6a539971392741d14ea1408c56dc0564d52ffeb947d86549fed17762474d863d59a406cde86daa75a329bd5b6411a77702b
+DIST pyOpenSSL-16.2.0.tar.gz 167305 SHA256 7779a3bbb74e79db234af6a08775568c6769b5821faecf6e2f4143edb227516e SHA512 c1b068137a492564fe958603712d401b7ee0def94c01a28be55f5c89e07c25684ecb0f465f3c56f35924bde038894f2914ac49539144845fb586d12b80307078 WHIRLPOOL 60f2fe38ba773ed52bcfe88da57bd78f2114d7018a6184ec1c0fa2a8ae6dab4cf2495cd2aa75d7a5b2beee49477dbb6b4256034cec83752db0a3c7e5f7c4debb
+DIST pyOpenSSL-17.0.0.tar.gz 167121 SHA256 48abfe9d2bb8eb8d8947c8452b0223b7b1be2383b332f3b4f248fe59ef0bafdd SHA512 819be95f920a70b40ae48ed6740bd1d8cd3bf2fc080f682db8978946929994cb87ac467e220267dcdafc40aa7ed2cce51a334a49b06c1e2665d295157181ddad WHIRLPOOL 8256ad13d35d7c7d1678bd6c35140e13a1f601f149bc38633b3f04eaec7e302853abcb5df857a04fd04dc8ac3feeb35d4247dc979cee0969dafc538ec9b70d5c
+DIST pyOpenSSL-17.2.0.tar.gz 170816 SHA256 5d617ce36b07c51f330aa63b83bf7f25c40a0e95958876d54d1982f8c91b4834 SHA512 aef1628665353445760a0c869c5b88ba1f61a3ade7471bfd1ad9e57672573501574dab5a2491aaac1dc283893fcac1a81dd9b972f43d53fe7ef1aa48e3f0e88a WHIRLPOOL aab3617e825237032efa44d5b89603bcd6b33095f76bb04b53140138066d9c6e96b64bb6def4425b3cf3aa279691142c66bf5c6b9a89ef5e5c64eb83459dc5a9
+DIST pyOpenSSL-17.3.0.tar.gz 168119 SHA256 29630b9064a82e04d8242ea01d7c93d70ec320f5e3ed48e95fcabc6b1d0f6c76 SHA512 2b58a652b8d6e2adadbc620a6b3411cd44169940ef1839fd3365cd343ebe1e630ddbb580d8d4dc79e738e0b4f91db0bdbbaecf18aea74204499c737eebb3fae8 WHIRLPOOL 154cb8beedd57c24aced9c0a37b2395a9c25a0696b803c70d40bc4df98802587e73602c7c74aebd03c60dd54849c293eede1366c0b2f5ccb0967331235754bc0
+EBUILD pyopenssl-0.15.1-r1.ebuild 1416 SHA256 7be89365e33ba5cbb2efa8e826f65fdab20d5c67843ee177956f54eb75b67eb0 SHA512 1f86106bd544bc70483c805ac7a20e17f09237d866d36101c627426052e69bc6e5beb92712b7bc6d1eecfb1cca84e782ed7a6f8dcba07f1138a1c6acb1509436 WHIRLPOOL fb9317ce60a7d5a09be49fdb126ad97649adf91a8a666dde7d10203557ff5eb8aeeab49dfd450bb0e60843c4cad2197517401f7a8f38456dad1df558627408d6
+EBUILD pyopenssl-16.2.0.ebuild 1596 SHA256 bfb30ec6cd042d2a05b9556ab79e09a3c9f9e0f697d5eb5cf377ef4acbd4fc44 SHA512 f91345bef67ef4d002828b6db8cfdde9ea1bd2e502672e2c29be7cedb814127a0d7f08ac0ab1c601b7056a406020bc3569c5a6b163fd3b13d92b6290afeccc2b WHIRLPOOL 44fd4190e89a6509578f985e9d98992fe6bdb959b9bac6e2cb46fe84394cdc53e566be3f0870ed54d51ca1e1387aee3f6f93e260318dc57cd1a5551e84f94c90
+EBUILD pyopenssl-17.0.0.ebuild 1606 SHA256 5e073afa1eaa9038b151024f63ef947ec3ba2970c187a616d9ac1ac61ef1a9e6 SHA512 e8f73d81532e7ccecbd96f6958ed65ebae636efc703bb02543ed27e136f6a48b086b5e3a230685d1ea8a7b19ddbd29340b53e908b9eb8756644645a0fef2fb5f WHIRLPOOL 7b2d4dfaf78c29ecac5f19cb9bcaae5f2982c8b5d02a07d7cd137460de8530dae1507cd79a1df76414d958180d5e2dff54bf2c46a64a1b9f17c1dd468129526d
+EBUILD pyopenssl-17.2.0.ebuild 1587 SHA256 559db4c8692532c60f0f0c3b439453ea6a2ad63e43b8dacf2b4ec79ecef824e1 SHA512 83f26644e5f8010cd148ca721575fc791b7818bda57db5c8e2138ee8cd734f47d97a7f2db9a61ddb6f0eceb81ea1435ad2a04dae3ce0e5c03fdbece785aea9d0 WHIRLPOOL 7505da0d9759548ab00bdaef2e3b4d68175c8dcc05564cf7adcb00bd85a377d45cd339ae369c8761fad0270f1e0c412128e7c5a8878493d9e9b00d60af66a3b8
+EBUILD pyopenssl-17.3.0.ebuild 1596 SHA256 20ebc2ea0d58a320020cb3df9d0b61e83c9d84cd4b4d22597d6af036ec1b267c SHA512 8c78ae11c0c3855a95d4e49fb0d207baeb17671512a77a2d95ed321eff15da62008a0ec9b1a9dc49d810538fff8fe0592de4466bee49b93455d1be4302d22f94 WHIRLPOOL 16b7e002ca3d83eacf691531c02f9d090504f954388df44d847cde8e687ba7e835334615fbdd2f403e0a383c67db92cd6088a7a23af2ac8381874b2ec6fabdc8
+MISC ChangeLog 8426 SHA256 8bce425d7e7c24aaf605b887c4260ba5bae138bc52584a9ac30290549d4abaea SHA512 c7530188fc6cc999de3f270bc87535f6feaf96a5e2bbac6d9c7f9ec24c4d565ebf59d9bdb073e28ea950dc7453f1e1aa901bfa0f8d3b419ac0d5a0cc66fae26c WHIRLPOOL 2702a906b074c1f23a6dde94f0793a66bb5014dcf50b97bf0b982200378502c860da8687123180b3ad632bcd92fc92b02cc7f88a40fc4b709dbd365fd2074915
+MISC ChangeLog-2015 17860 SHA256 1ef7c0a393d8b3f02848a5ae563a9db19816e91dea442fdb71dc0cdc354d0489 SHA512 700d9fc11d518f5e57c141979d49a169baa2b9508f1d67602f075a5831c4ecec631170dc62569be35f4e6f9bc38533a89405f076cb43683349a660a53e5859fe WHIRLPOOL eb72992cca08df2d762da2679a07345fcfe35b6377e6d11d162a135d0742bbffafacc3706dbcfa769829d5fef561e16cc6c2d4e047cae2e537c2a6864467c2e5
+MISC metadata.xml 418 SHA256 68aeb875660dad3988a0aa0cd45248fedf62d9df646bf4aa42a25421836636d8 SHA512 5cd4b0381e79245626500a2a38b9f7bedcc8e4742445ac16f12a96133f1291ec49592f2259294f153d5f1b27969cd6f7f364d49f32d0793b12b2ad38b824f441 WHIRLPOOL c12c999aedb6245a492b1670dd416988777b33fbc4d381b1cb4657c30535065e87e3169104ed7d37cfc9b431a3aeaed4a847cf3ebd251b054d4af51ca757c99d
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
new file mode 100644
index 000000000000..3e2c06c1abd1
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
@@ -0,0 +1,19 @@
+ OpenSSL/test/test_ssl.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
+index bb1c9ae..d3bffe7 100644
+--- a/OpenSSL/test/test_ssl.py
++++ b/OpenSSL/test/test_ssl.py
+@@ -1416,6 +1416,11 @@ class ContextTests(TestCase, _LoopbackMixin):
+ """
+ context = Context(TLSv1_METHOD)
+ for curve in get_elliptic_curves():
++ if curve.name.startswith(u"Oakley-"):
++ # Setting Oakley-EC2N-4 and Oakley-EC2N-3 adds
++ # ('bignum routines', 'BN_mod_inverse', 'no inverse') to the
++ # error queue on OpenSSL 1.0.2.
++ continue
+ # The only easily "assertable" thing is that it does not raise an
+ # exception.
+ context.set_tmp_ecdh(curve)
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
new file mode 100644
index 000000000000..be3c18039480
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
@@ -0,0 +1,31 @@
+ OpenSSL/crypto.py | 3 +++
+ OpenSSL/test/test_crypto.py | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
+index 555ba24..2c1eddb 100644
+--- a/OpenSSL/crypto.py
++++ b/OpenSSL/crypto.py
+@@ -464,6 +464,9 @@ class X509Name(object):
+ if isinstance(value, _text_type):
+ value = value.encode('utf-8')
+
++ # Make it so OpenSSL generates utf-8 strings.
++ _lib.ASN1_STRING_set_default_mask_asc(b'utf8only')
++
+ add_result = _lib.X509_NAME_add_entry_by_NID(
+ self._name, nid, _lib.MBSTRING_UTF8, value, -1, -1, 0)
+ if not add_result:
+diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
+index 1620623..b817451 100644
+--- a/OpenSSL/test/test_crypto.py
++++ b/OpenSSL/test/test_crypto.py
+@@ -1003,7 +1003,7 @@ class X509NameTests(TestCase):
+ self.assertEqual(
+ a.der(),
+ b('0\x1b1\x0b0\t\x06\x03U\x04\x06\x13\x02US'
+- '1\x0c0\n\x06\x03U\x04\x03\x13\x03foo'))
++ '1\x0c0\n\x06\x03U\x04\x03\x0c\x03foo'))
+
+
+ def test_get_components(self):
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
new file mode 100644
index 000000000000..048ede23786e
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
@@ -0,0 +1,84 @@
+From fc18f7bed12f58100c3a5eef3dbae29c9a26f18a Mon Sep 17 00:00:00 2001
+From: Jeff Tang <mrjefftang@users.noreply.github.com>
+Date: Wed, 15 Apr 2015 17:42:33 -0400
+Subject: [PATCH] OpenSSL 1.0.2 Compatibility
+
+- Perform the time comparison in python to fix #192
+- Add root cert has_expired test
+- Self sign test cert to fix issue in #149
+- Change test case to verify digest of a valid certficate
+---
+ OpenSSL/crypto.py | 9 +++++----
+ OpenSSL/test/test_crypto.py | 15 +++++++++++++--
+ 2 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
+index c7bdabc..1b1058e 100644
+--- a/OpenSSL/crypto.py
++++ b/OpenSSL/crypto.py
+@@ -1,5 +1,6 @@
+-from time import time
++from time import time, strptime
+ from base64 import b16encode
++from calendar import timegm
+ from functools import partial
+ from operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__
+ from warnings import warn as _warn
+@@ -1161,10 +1162,10 @@ def has_expired(self):
+ :return: True if the certificate has expired, false otherwise
+ """
+ now = int(time())
+- notAfter = _lib.X509_get_notAfter(self._x509)
+- return _lib.ASN1_UTCTIME_cmp_time_t(
+- _ffi.cast('ASN1_UTCTIME*', notAfter), now) < 0
++ notAfter = self.get_notAfter().decode('utf-8')
++ notAfterSecs = timegm(strptime(notAfter, '%Y%m%d%H%M%SZ'))
+
++ return now > notAfterSecs
+
+ def _get_boundary_time(self, which):
+ return _get_asn1_time(which(self._x509))
+diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
+index 73e9cc7..b817451 100644
+--- a/OpenSSL/test/test_crypto.py
++++ b/OpenSSL/test/test_crypto.py
+@@ -1562,19 +1562,29 @@ def test_has_not_expired(self):
+ cert.gmtime_adj_notAfter(2)
+ self.assertFalse(cert.has_expired())
+
++ def test_root_has_not_expired(self):
++ """
++ :py:obj:`X509Type.has_expired` returns :py:obj:`False` if the certificate's not-after
++ time is in the future.
++ """
++ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
++ self.assertFalse(cert.has_expired())
++
+
+ def test_digest(self):
+ """
+ :py:obj:`X509.digest` returns a string giving ":"-separated hex-encoded words
+ of the digest of the certificate.
+ """
+- cert = X509()
++ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
+ self.assertEqual(
+ # This is MD5 instead of GOOD_DIGEST because the digest algorithm
+ # actually matters to the assertion (ie, another arbitrary, good
+ # digest will not product the same digest).
++ # Digest verified with the command:
++ # openssl x509 -in root_cert.pem -noout -fingerprint -md5
+ cert.digest("MD5"),
+- b("A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15"))
++ b("19:B3:05:26:2B:F8:F2:FF:0B:8F:21:07:A8:28:B8:75"))
+
+
+ def _extcert(self, pkey, extensions):
+@@ -1587,6 +1597,7 @@ def _extcert(self, pkey, extensions):
+ cert.set_notAfter(when)
+
+ cert.add_extensions(extensions)
++ cert.sign(pkey, 'sha1')
+ return load_certificate(
+ FILETYPE_PEM, dump_certificate(FILETYPE_PEM, cert))
+
diff --git a/dev-python/pyopenssl/metadata.xml b/dev-python/pyopenssl/metadata.xml
new file mode 100644
index 000000000000..4497991b3740
--- /dev/null
+++ b/dev-python/pyopenssl/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pyOpenSSL</remote-id>
+ <remote-id type="launchpad">pyopenssl</remote-id>
+ <remote-id type="sourceforge">pyopenssl</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild b/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
new file mode 100644
index 000000000000..7133e32ab838
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="doc examples"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-0.7[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport.patch
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport-1.patch
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport-2.patch
+)
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ esetup.py test
+
+ # https://bugs.launchpad.net/pyopenssl/+bug/1237953
+ rm -rf tmp* *.key *.pem || die
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pyopenssl/pyopenssl-16.2.0.ebuild b/dev-python/pyopenssl/pyopenssl-16.2.0.ebuild
new file mode 100644
index 000000000000..2b8579283288
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-16.2.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x64-cygwin ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="doc examples test"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.3[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+python_prepare_all() {
+ # Requires network access
+ sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ # FIXME: for some reason, no-ops on PyPy
+ py.test -v || die "Testing failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ if use examples ; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pyopenssl/pyopenssl-17.0.0.ebuild b/dev-python/pyopenssl/pyopenssl-17.0.0.ebuild
new file mode 100644
index 000000000000..ba3f71d2929a
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-17.0.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x64-cygwin ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="doc examples test"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.3[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+ test? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+python_prepare_all() {
+ # Requires network access
+ sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ # FIXME: for some reason, no-ops on PyPy
+ py.test -v || die "Testing failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ if use examples ; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pyopenssl/pyopenssl-17.2.0.ebuild b/dev-python/pyopenssl/pyopenssl-17.2.0.ebuild
new file mode 100644
index 000000000000..e417175b253b
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-17.2.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 hppa ia64 mips ppc ppc64 x86"
+IUSE="doc examples test"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.9[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ )
+ test? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ dev-python/flaky[${PYTHON_USEDEP}]
+ dev-python/pretend[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+python_prepare_all() {
+ # Requires network access
+ sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ # FIXME: for some reason, no-ops on PyPy
+ py.test -v || die "Testing failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ if use examples ; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild b/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild
new file mode 100644
index 000000000000..d873a6b97ce3
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
+IUSE="doc examples test"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-1.9[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? (
+ dev-python/sphinx[${PYTHON_USEDEP}]
+ dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
+ )
+ test? (
+ virtual/python-cffi[${PYTHON_USEDEP}]
+ dev-python/flaky[${PYTHON_USEDEP}]
+ dev-python/pretend[${PYTHON_USEDEP}]
+ >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+python_prepare_all() {
+ # Requires network access
+ sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
+ distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ # FIXME: for some reason, no-ops on PyPy
+ py.test -v || die "Testing failed with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ if use examples ; then
+ docinto examples
+ dodoc -r examples/*
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ distutils-r1_python_install_all
+}