From fe3e1e69ff68c1ae22f8897e495b5a48f61a8b9a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 15 Jul 2014 09:01:26 +0200 Subject: [PATCH] python3.4: libressl patches from OpenBSD (removing RAND_egd()). --- srcpkgs/python3.4/patches/patch-Lib_ssl_py | 12 +++++ .../python3.4/patches/patch-Modules__ssl_c | 47 +++++++++++++++++++ srcpkgs/python3.4/template | 2 +- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/python3.4/patches/patch-Lib_ssl_py create mode 100644 srcpkgs/python3.4/patches/patch-Modules__ssl_c diff --git a/srcpkgs/python3.4/patches/patch-Lib_ssl_py b/srcpkgs/python3.4/patches/patch-Lib_ssl_py new file mode 100644 index 00000000000..caf1b103ace --- /dev/null +++ b/srcpkgs/python3.4/patches/patch-Lib_ssl_py @@ -0,0 +1,12 @@ +$OpenBSD: patch-Lib_ssl_py,v 1.1 2014/04/20 09:48:03 sthen Exp $ +--- Lib/ssl.py.orig Mon Mar 17 02:31:30 2014 ++++ Lib/ssl.py Sat Apr 19 19:30:04 2014 +@@ -106,7 +106,7 @@ from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIR + from _ssl import (VERIFY_DEFAULT, VERIFY_CRL_CHECK_LEAF, VERIFY_CRL_CHECK_CHAIN, + VERIFY_X509_STRICT) + from _ssl import txt2obj as _txt2obj, nid2obj as _nid2obj +-from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes ++from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes + + def _import_symbols(prefix): + for n in dir(_ssl): diff --git a/srcpkgs/python3.4/patches/patch-Modules__ssl_c b/srcpkgs/python3.4/patches/patch-Modules__ssl_c new file mode 100644 index 00000000000..241a9d66c5f --- /dev/null +++ b/srcpkgs/python3.4/patches/patch-Modules__ssl_c @@ -0,0 +1,47 @@ +$OpenBSD: patch-Modules__ssl_c,v 1.1 2014/04/20 09:48:03 sthen Exp $ +--- Modules/_ssl.c.orig Mon Mar 17 02:31:31 2014 ++++ Modules/_ssl.c Sat Apr 19 19:29:29 2014 +@@ -3317,34 +3317,6 @@ Returns 1 if the OpenSSL PRNG has been seeded with eno + It is necessary to seed the PRNG with RAND_add() on some platforms before\n\ + using the ssl() function."); + +-static PyObject * +-PySSL_RAND_egd(PyObject *self, PyObject *args) +-{ +- PyObject *path; +- int bytes; +- +- if (!PyArg_ParseTuple(args, "O&:RAND_egd", +- PyUnicode_FSConverter, &path)) +- return NULL; +- +- bytes = RAND_egd(PyBytes_AsString(path)); +- Py_DECREF(path); +- if (bytes == -1) { +- PyErr_SetString(PySSLErrorObject, +- "EGD connection failed or EGD did not return " +- "enough data to seed the PRNG"); +- return NULL; +- } +- return PyLong_FromLong(bytes); +-} +- +-PyDoc_STRVAR(PySSL_RAND_egd_doc, +-"RAND_egd(path) -> bytes\n\ +-\n\ +-Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\ +-Returns number of bytes read. Raises SSLError if connection to EGD\n\ +-fails or if it does not provide enough data to seed PRNG."); +- + #endif /* HAVE_OPENSSL_RAND */ + + +@@ -3739,8 +3711,6 @@ static PyMethodDef PySSL_methods[] = { + PySSL_RAND_bytes_doc}, + {"RAND_pseudo_bytes", PySSL_RAND_pseudo_bytes, METH_VARARGS, + PySSL_RAND_pseudo_bytes_doc}, +- {"RAND_egd", PySSL_RAND_egd, METH_VARARGS, +- PySSL_RAND_egd_doc}, + {"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS, + PySSL_RAND_status_doc}, + #endif diff --git a/srcpkgs/python3.4/template b/srcpkgs/python3.4/template index 4d6e56fa066..3f962e51ee0 100644 --- a/srcpkgs/python3.4/template +++ b/srcpkgs/python3.4/template @@ -1,7 +1,7 @@ # Template file for 'python3.4' pkgname=python3.4 version=3.4.1 -revision=5 +revision=6 wrksrc="Python-${version}" short_desc="Interpreted, interactive, object-oriented programming language (${version%.*} series)" maintainer="Juan RP "