This update to py-openssl requires py-cryptography which was imported
fairly recently. There are a couple of test failures, but they're the same
as with the in-tree version. Tested with yubiserve.
- Support for TLSv1.1 and TLSv1.2
- First-class support for PyPy
- New flags, such as MODE_RELEASE_BUFFERS and OP_NO_COMPRESSION
- Some APIs to access to the SSL session cache
- A variety of bug fixes for error handling cases
(TLSv1.1/1.2 support is where you force a particular version; they
were already supported with the [misnamed] SSLv23 method).
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/security/py-openssl/Makefile,v
retrieving revision 1.23
diff -u -p -r1.23 Makefile
--- Makefile 22 Jun 2015 22:40:59 -0000 1.23
+++ Makefile 18 Jul 2015 04:30:55 -0000
@@ -2,8 +2,7 @@
COMMENT= Python interface to the OpenSSL library
-MODPY_EGG_VERSION= 0.13
-REVISION= 1
+MODPY_EGG_VERSION= 0.14
DISTNAME= pyOpenSSL-${MODPY_EGG_VERSION}
PKGNAME= py-openssl-${MODPY_EGG_VERSION}
CATEGORIES= security devel
@@ -15,10 +14,14 @@ MAINTAINER= Eric Faurot <[email protected]
# Apache 2
PERMIT_PACKAGE_CDROM= Yes
+RUN_DEPENDS = security/py-cryptography
+BUILD_DEPENDS = ${RUN_DEPENDS}
+
WANTLIB += ${MODPY_WANTLIB}
WANTLIB += crypto pthread ssl
MODPY_PI = Yes
+MODPY_SETUPTOOLS = Yes
MODULES= lang/python
Index: distinfo
===================================================================
RCS file: /cvs/ports/security/py-openssl/distinfo,v
retrieving revision 1.9
diff -u -p -r1.9 distinfo
--- distinfo 18 Jan 2015 03:15:06 -0000 1.9
+++ distinfo 18 Jul 2015 04:30:55 -0000
@@ -1,2 +1,2 @@
-SHA256 (pyOpenSSL-0.13.tar.gz) = IeErA6uqDgTsyM2cJRWY9xuuEcnzhTBCNOTqVhjGFjs=
-SIZE (pyOpenSSL-0.13.tar.gz) = 250489
+SHA256 (pyOpenSSL-0.14.tar.gz) = qZ245ZwSATitinLuztzCS0UQ0u7TzkghO34y8izE7m4=
+SIZE (pyOpenSSL-0.14.tar.gz) = 128005
Index: patches/patch-OpenSSL_rand_rand_c
===================================================================
RCS file: patches/patch-OpenSSL_rand_rand_c
diff -N patches/patch-OpenSSL_rand_rand_c
--- patches/patch-OpenSSL_rand_rand_c 21 Apr 2014 19:17:50 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-OpenSSL_rand_rand_c,v 1.1 2014/04/21 19:17:50 jca Exp $
-Disable EGD support.
---- OpenSSL/rand/rand.c.orig Fri Sep 2 17:46:13 2011
-+++ OpenSSL/rand/rand.c Mon Apr 21 18:57:05 2014
-@@ -111,6 +111,7 @@ rand_screen(PyObject *spam, PyObject *args)
- }
- #endif
-
-+#if 0
- static char rand_egd_doc[] = "\n\
- Query an entropy gathering daemon (EGD) for random data and add it to the\n\
- PRNG. I haven't found any problems when the socket is missing, the function\n\
-@@ -133,6 +134,7 @@ rand_egd(PyObject *spam, PyObject *args)
-
- return PyLong_FromLong((long)RAND_egd_bytes(path, bytes));
- }
-+#endif
-
- static char rand_cleanup_doc[] = "\n\
- Erase the memory used by the PRNG.\n\
-@@ -245,7 +247,9 @@ static PyMethodDef rand_methods[] = {
- #ifdef MS_WINDOWS
- { "screen", (PyCFunction)rand_screen, METH_VARARGS,
rand_screen_doc },
- #endif
-+#if 0
- { "egd", (PyCFunction)rand_egd, METH_VARARGS, rand_egd_doc
},
-+#endif
- { "cleanup", (PyCFunction)rand_cleanup, METH_VARARGS,
rand_cleanup_doc },
- { "load_file", (PyCFunction)rand_load_file, METH_VARARGS,
rand_load_file_doc },
- { "write_file",(PyCFunction)rand_write_file, METH_VARARGS,
rand_write_file_doc },
Index: patches/patch-OpenSSL_test_test_rand_py
===================================================================
RCS file: patches/patch-OpenSSL_test_test_rand_py
diff -N patches/patch-OpenSSL_test_test_rand_py
--- patches/patch-OpenSSL_test_test_rand_py 21 Apr 2014 19:17:50 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,34 +0,0 @@
-$OpenBSD: patch-OpenSSL_test_test_rand_py,v 1.1 2014/04/21 19:17:50 jca Exp $
---- OpenSSL/test/test_rand.py.orig Mon Apr 21 20:27:18 2014
-+++ OpenSSL/test/test_rand.py Mon Apr 21 20:27:28 2014
-@@ -95,30 +95,6 @@ class RandTests(TestCase):
- self.assertTrue(rand.status() in (1, 2))
-
-
-- def test_egd_wrong_args(self):
-- """
-- L{OpenSSL.rand.egd} raises L{TypeError} when called with the wrong
-- number of arguments or with arguments not of type C{str} and C{int}.
-- """
-- self.assertRaises(TypeError, rand.egd)
-- self.assertRaises(TypeError, rand.egd, None)
-- self.assertRaises(TypeError, rand.egd, "foo", None)
-- self.assertRaises(TypeError, rand.egd, None, 3)
-- self.assertRaises(TypeError, rand.egd, "foo", 3, None)
--
--
-- def test_egd_missing(self):
-- """
-- L{OpenSSL.rand.egd} returns C{0} or C{-1} if the EGD socket passed
-- to it does not exist.
-- """
-- result = rand.egd(self.mktemp())
-- expected = (-1, 0)
-- self.assertTrue(
-- result in expected,
-- "%r not in %r" % (result, expected))
--
--
- def test_cleanup_wrong_args(self):
- """
- L{OpenSSL.rand.cleanup} raises L{TypeError} when called with any
Index: patches/patch-OpenSSL_test_test_ssl_py
===================================================================
RCS file:
/cvs/ports/security/py-openssl/patches/patch-OpenSSL_test_test_ssl_py,v
retrieving revision 1.1
diff -u -p -r1.1 patch-OpenSSL_test_test_ssl_py
--- patches/patch-OpenSSL_test_test_ssl_py 25 Nov 2011 20:19:30 -0000
1.1
+++ patches/patch-OpenSSL_test_test_ssl_py 18 Jul 2015 04:30:55 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-OpenSSL_test_test_ssl_py,v 1.1 2011/11/25 20:19:30 eric Exp $
---- OpenSSL/test/test_ssl.py.orig Fri Sep 2 17:46:13 2011
-+++ OpenSSL/test/test_ssl.py Thu Nov 24 10:42:34 2011
-@@ -1153,13 +1153,13 @@ class ConnectionTests(TestCase, _LoopbackMixin):
+--- OpenSSL/test/test_ssl.py.orig Sun Feb 23 05:36:45 2014
++++ OpenSSL/test/test_ssl.py Fri Jul 17 22:17:01 2015
+@@ -1576,13 +1576,13 @@ class ConnectionTests(TestCase, _LoopbackMixin):
errno instead of raising an exception.
"""
port = socket()
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/py-openssl/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- pkg/PLIST 25 Nov 2011 20:19:30 -0000 1.5
+++ pkg/PLIST 18 Jul 2015 04:30:55 -0000
@@ -1,10 +1,15 @@
@comment $OpenBSD: PLIST,v 1.5 2011/11/25 20:19:30 eric Exp $
lib/python${MODPY_VERSION}/site-packages/OpenSSL/
-lib/python${MODPY_VERSION}/site-packages/OpenSSL/SSL.so
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/SSL.py
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/SSL.pyc
lib/python${MODPY_VERSION}/site-packages/OpenSSL/__init__.py
lib/python${MODPY_VERSION}/site-packages/OpenSSL/__init__.pyc
-lib/python${MODPY_VERSION}/site-packages/OpenSSL/crypto.so
-lib/python${MODPY_VERSION}/site-packages/OpenSSL/rand.so
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/_util.py
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/_util.pyc
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/crypto.py
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/crypto.pyc
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/rand.py
+lib/python${MODPY_VERSION}/site-packages/OpenSSL/rand.pyc
lib/python${MODPY_VERSION}/site-packages/OpenSSL/test/
lib/python${MODPY_VERSION}/site-packages/OpenSSL/test/__init__.py
lib/python${MODPY_VERSION}/site-packages/OpenSSL/test/__init__.pyc
@@ -20,14 +25,19 @@ lib/python${MODPY_VERSION}/site-packages
lib/python${MODPY_VERSION}/site-packages/OpenSSL/tsafe.pyc
lib/python${MODPY_VERSION}/site-packages/OpenSSL/version.py
lib/python${MODPY_VERSION}/site-packages/OpenSSL/version.pyc
-lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info
-share/examples/py-openssl/
-share/examples/py-openssl/README
-share/examples/py-openssl/SecureXMLRPCServer.py
-share/examples/py-openssl/certgen.py
-share/examples/py-openssl/mk_simple_certs.py
-share/examples/py-openssl/proxy.py
-share/examples/py-openssl/simple/
-share/examples/py-openssl/simple/README
-share/examples/py-openssl/simple/client.py
-share/examples/py-openssl/simple/server.py
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/PKG-INFO
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/SOURCES.txt
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/dependency_links.txt
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/requires.txt
+lib/python${MODPY_VERSION}/site-packages/pyOpenSSL-${MODPY_EGG_VERSION}-py${MODPY_VERSION}.egg-info/top_level.txt
+share/examples/${MODPY_PY_PREFIX}openssl/
+share/examples/${MODPY_PY_PREFIX}openssl/README
+share/examples/${MODPY_PY_PREFIX}openssl/SecureXMLRPCServer.py
+share/examples/${MODPY_PY_PREFIX}openssl/certgen.py
+share/examples/${MODPY_PY_PREFIX}openssl/mk_simple_certs.py
+share/examples/${MODPY_PY_PREFIX}openssl/proxy.py
+share/examples/${MODPY_PY_PREFIX}openssl/simple/
+share/examples/${MODPY_PY_PREFIX}openssl/simple/README
+share/examples/${MODPY_PY_PREFIX}openssl/simple/client.py
+share/examples/${MODPY_PY_PREFIX}openssl/simple/server.py