python3.4: libressl patches from OpenBSD (removing RAND_egd()).

This commit is contained in:
Juan RP 2014-07-15 09:01:26 +02:00
parent ef1085988d
commit fe3e1e69ff
3 changed files with 60 additions and 1 deletions

View file

@ -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):

View file

@ -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

View file

@ -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 <xtraeme@gmail.com>"